From 70a58715f35c59a360079f9baee3bd5abde6a0e6 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 18 Oct 2017 08:36:07 +0200 Subject: [PATCH 1/3] Fix unused-variables errors found by pylint --- bumblebee/config.py | 2 +- bumblebee/modules/currency.py | 4 ++-- bumblebee/modules/weather.py | 4 ++-- bumblebee/output.py | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bumblebee/config.py b/bumblebee/config.py index d8c8613..69dae84 100644 --- a/bumblebee/config.py +++ b/bumblebee/config.py @@ -71,7 +71,7 @@ class Config(bumblebee.store.Store): self._args = parser.parse_args(args if args else []) if not self._args.debug: - logger = logging.getLogger().disabled = True + logging.getLogger().disabled = True for param in self._args.parameters: key, value = param.split("=") diff --git a/bumblebee/modules/currency.py b/bumblebee/modules/currency.py index 759530d..7cda1d9 100644 --- a/bumblebee/modules/currency.py +++ b/bumblebee/modules/currency.py @@ -59,9 +59,9 @@ class Module(bumblebee.engine.Module): def update(self, widgets): timestamp = int(time.time()) - if self._nextcheck < int(time.time()): + if self._nextcheck < timestamp: self._data = [] - self._nextcheck = int(time.time()) + self._interval*60 + self._nextcheck = timestamp + self._interval*60 for symbol in self._symbols: url = API_URL.format(self._base, symbol) try: diff --git a/bumblebee/modules/weather.py b/bumblebee/modules/weather.py index 1bad080..9838a0f 100644 --- a/bumblebee/modules/weather.py +++ b/bumblebee/modules/weather.py @@ -83,9 +83,9 @@ class Module(bumblebee.engine.Module): def update(self, widgets): timestamp = int(time.time()) - if self._nextcheck < int(time.time()): + if self._nextcheck < timestamp: try: - self._nextcheck = int(time.time()) + self._interval*60 + self._nextcheck = timestamp + self._interval*60 weather_url = "http://api.openweathermap.org/data/2.5/weather?appid={}".format(self._apikey) weather_url = "{}&units={}".format(weather_url, self._unit) if self._location == "auto": diff --git a/bumblebee/output.py b/bumblebee/output.py index c7ebbe9..99dadc3 100644 --- a/bumblebee/output.py +++ b/bumblebee/output.py @@ -102,7 +102,6 @@ class I3BarOutput(object): padding = self._theme.padding(widget) prefix = self._theme.prefix(widget, padding) suffix = self._theme.suffix(widget, padding) - minwidth = self._theme.minwidth(widget) if prefix: full_text = u"{}{}".format(prefix, full_text) if suffix: From a13e5930123c000cd2a6e52578f607da09e8078b Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 18 Oct 2017 08:38:26 +0200 Subject: [PATCH 2/3] Fix unused-import errors found by pylint --- bumblebee/modules/currency.py | 1 - 1 file changed, 1 deletion(-) diff --git a/bumblebee/modules/currency.py b/bumblebee/modules/currency.py index 7cda1d9..2fd466f 100644 --- a/bumblebee/modules/currency.py +++ b/bumblebee/modules/currency.py @@ -20,7 +20,6 @@ Note: source and destination names right now must correspond to the names used b import bumblebee.input import bumblebee.output import bumblebee.engine -import json import time try: import requests From 8ce0c543633883af0add8eb35c01878867b30b9c Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 18 Oct 2017 08:39:57 +0200 Subject: [PATCH 3/3] Speed up travis startup time Use a container based environment --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 61e1ff9..ee2f9be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +sudo: false language: python python: - "2.7"