Fix trailing-whitespace errors found by pylint
This commit is contained in:
parent
57204a215e
commit
5f20fa6134
6 changed files with 11 additions and 12 deletions
|
@ -87,7 +87,7 @@ class Config(bumblebee.store.Store):
|
|||
def theme(self):
|
||||
"""Return the name of the selected theme"""
|
||||
return self._args.theme
|
||||
|
||||
|
||||
def debug(self):
|
||||
return self._args.debug
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class Module(bumblebee.engine.Module):
|
|||
if self._count == 0:
|
||||
thread = threading.Thread(target=get_pacman_info, args=(widgets[0], path))
|
||||
thread.start()
|
||||
|
||||
|
||||
# TODO: improve this waiting mechanism a bit
|
||||
self._count += 1
|
||||
self._count = 0 if self._count > 300 else self._count
|
||||
|
|
|
@ -4,7 +4,7 @@ Requires the following python packages:
|
|||
* requests
|
||||
|
||||
Parameters:
|
||||
* publicip.region: us-central (default), us-east, us-west, uk, de, pl, nl
|
||||
* publicip.region: us-central (default), us-east, us-west, uk, de, pl, nl
|
||||
* publicip.service: web address that returns plaintext ip address (ex. "http://l2.io/ip")
|
||||
"""
|
||||
|
||||
|
@ -21,7 +21,7 @@ class Module(bumblebee.engine.Module):
|
|||
super(Module, self).__init__(engine, config,
|
||||
bumblebee.output.Widget(full_text=self.public_ip)
|
||||
)
|
||||
self._avail_regions = {"us-east":"http://l2.io/ip",
|
||||
self._avail_regions = {"us-east":"http://l2.io/ip",
|
||||
"us-central":"http://whatismyip.akamai.com",
|
||||
"us-west":"http://ipv4bot.whatismyipaddress.com",
|
||||
"pl":"http://ip.42.pl/raw",
|
||||
|
@ -45,4 +45,3 @@ class Module(bumblebee.engine.Module):
|
|||
self._ip = get(self.address).text.rstrip()
|
||||
except Exception:
|
||||
self._ip = "No Connection"
|
||||
|
||||
|
|
|
@ -15,24 +15,24 @@ 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.output)
|
||||
)
|
||||
self._todos = self.count_items()
|
||||
self._todos = self.count_items()
|
||||
|
||||
|
||||
def output(self, widget):
|
||||
self._todos = self.count_items()
|
||||
return str(self._todos)
|
||||
|
||||
|
||||
|
||||
def state(self, widgets):
|
||||
if self._todos == 0:
|
||||
return "empty"
|
||||
return "items"
|
||||
|
||||
|
||||
|
||||
def count_items(filename):
|
||||
try:
|
||||
|
@ -41,7 +41,7 @@ class Module(bumblebee.engine.Module):
|
|||
with open(doc) as f:
|
||||
for i, l in enumerate(f):
|
||||
pass
|
||||
return i+1
|
||||
return i+1
|
||||
except Exception:
|
||||
return 0
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ class Module(bumblebee.engine.Module):
|
|||
}
|
||||
|
||||
name = "traffic-{}".format(interface)
|
||||
|
||||
|
||||
if self._showname:
|
||||
self.create_widget(widgets, name, interface)
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ class Module(bumblebee.engine.Module):
|
|||
last_neighbor = next((widget for widget in reversed(self.widgets()) if widget.get("state") == "on"), None)
|
||||
|
||||
neighbor = first_neighbor if event["button"] == bumblebee.input.LEFT_MOUSE else last_neighbor
|
||||
|
||||
|
||||
if neighbor == None:
|
||||
bumblebee.util.execute("{} --output {} --auto".format(toggle_cmd, widget.name))
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue