From 5f20fa6134c1b9665999120c1f0ba1b0a35a47d3 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Fri, 13 Oct 2017 17:09:09 +0200 Subject: [PATCH] Fix trailing-whitespace errors found by pylint --- bumblebee/config.py | 2 +- bumblebee/modules/pacman.py | 2 +- bumblebee/modules/publicip.py | 5 ++--- bumblebee/modules/todo.py | 10 +++++----- bumblebee/modules/traffic.py | 2 +- bumblebee/modules/xrandr.py | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/bumblebee/config.py b/bumblebee/config.py index 762d3ac..d8c8613 100644 --- a/bumblebee/config.py +++ b/bumblebee/config.py @@ -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 diff --git a/bumblebee/modules/pacman.py b/bumblebee/modules/pacman.py index 44f0c9c..b5921a7 100644 --- a/bumblebee/modules/pacman.py +++ b/bumblebee/modules/pacman.py @@ -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 diff --git a/bumblebee/modules/publicip.py b/bumblebee/modules/publicip.py index 99899fe..5444ce6 100644 --- a/bumblebee/modules/publicip.py +++ b/bumblebee/modules/publicip.py @@ -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" - diff --git a/bumblebee/modules/todo.py b/bumblebee/modules/todo.py index 1151c77..afa0494 100644 --- a/bumblebee/modules/todo.py +++ b/bumblebee/modules/todo.py @@ -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 diff --git a/bumblebee/modules/traffic.py b/bumblebee/modules/traffic.py index 5b49a21..4b8b83f 100644 --- a/bumblebee/modules/traffic.py +++ b/bumblebee/modules/traffic.py @@ -87,7 +87,7 @@ class Module(bumblebee.engine.Module): } name = "traffic-{}".format(interface) - + if self._showname: self.create_widget(widgets, name, interface) diff --git a/bumblebee/modules/xrandr.py b/bumblebee/modules/xrandr.py index a1db224..4f9236c 100644 --- a/bumblebee/modules/xrandr.py +++ b/bumblebee/modules/xrandr.py @@ -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: