[all] black code :)
This commit is contained in:
parent
320827d577
commit
92577e7d26
14 changed files with 291 additions and 192 deletions
|
@ -121,15 +121,11 @@ class Module(core.module.Module):
|
|||
)
|
||||
|
||||
if util.format.asbool(self.parameter("compact-devices", False)):
|
||||
widget = self.add_widget(
|
||||
full_text=self.capacity, name="all-batteries"
|
||||
)
|
||||
widget = self.add_widget(full_text=self.capacity, name="all-batteries")
|
||||
else:
|
||||
for battery in self._batteries:
|
||||
log.debug("adding new widget for {}".format(battery))
|
||||
widget = self.add_widget(
|
||||
full_text=self.capacity, name=battery
|
||||
)
|
||||
widget = self.add_widget(full_text=self.capacity, name=battery)
|
||||
for w in self.widgets():
|
||||
if util.format.asbool(self.parameter("decorate", True)) == False:
|
||||
widget.set("theme.exclude", "suffix")
|
||||
|
|
|
@ -159,8 +159,7 @@ class Module(core.module.Module):
|
|||
for direction in ["rx", "tx"]:
|
||||
name = "traffic.{}-{}".format(direction, interface)
|
||||
widget = self.create_widget(
|
||||
name,
|
||||
attributes={"theme.minwidth": self.get_minwidth_str()},
|
||||
name, attributes={"theme.minwidth": self.get_minwidth_str()},
|
||||
)
|
||||
prev = self._prev.get(name, 0)
|
||||
bspeed = (int(data[direction]) - int(prev)) / timediff
|
||||
|
|
|
@ -198,7 +198,6 @@ class Module(core.module.Module):
|
|||
)
|
||||
)
|
||||
|
||||
|
||||
def state(self, widget):
|
||||
if widget.name.endswith("__read"):
|
||||
return "poolread"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue