From b21a62e82396f45d4aae43e1a56c453e6b3deb88 Mon Sep 17 00:00:00 2001 From: ibrokemypie Date: Mon, 5 Jun 2017 18:27:51 +1000 Subject: [PATCH] [modules/cpu] Linting --- bumblebee/modules/cpu.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bumblebee/modules/cpu.py b/bumblebee/modules/cpu.py index 10a2559..1a9a97d 100644 --- a/bumblebee/modules/cpu.py +++ b/bumblebee/modules/cpu.py @@ -19,19 +19,18 @@ import bumblebee.engine class Module(bumblebee.engine.Module): def __init__(self, engine, config): super(Module, self).__init__(engine, config, - bumblebee.output.Widget(full_text=self.utilization) - ) + bumblebee.output.Widget(full_text=self.utilization)) self._utilization = psutil.cpu_percent(percpu=False) engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE, - cmd="gnome-system-monitor") + cmd="gnome-system-monitor") - def utilization(self, widget): + def utilization(self, _): return "{:6.01f}%".format(self._utilization) def update(self, widgets): self._utilization = psutil.cpu_percent(percpu=False) - def state(self, widget): + def state(self, _): return self.threshold_state(self._utilization, 70, 80) # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4