kete: various flake8 fixes

>$ flake8 --ignore=E501,W504 tools
tools/kete.py:35:1: E302 expected 2 blank lines, found 1
tools/kete.py:553:12: E713 test for membership should be 'not in'
tools/kete.py:599:42: E226 missing whitespace around arithmetic operator
tools/kete.py:599:61: E226 missing whitespace around arithmetic operator
tools/kete.py:615:25: E226 missing whitespace around arithmetic operator
tools/kete.py:615:32: E226 missing whitespace around arithmetic operator
tools/kete.py:624:49: E225 missing whitespace around operator
tools/kete.py:871:9: F841 local variable 'e' is assigned to but never used
This commit is contained in:
Benjamin Tissoires 2019-04-23 11:56:32 +02:00
parent 146b480a84
commit 359502b134
1 changed files with 6 additions and 5 deletions

View File

@ -32,6 +32,7 @@ import configparser
CONFIG_PATH = os.path.join(xdg.BaseDirectory.xdg_data_home, 'tuhi-kete')
class ColorFormatter(logging.Formatter):
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, LIGHT_GRAY = range(30, 38)
DARK_GRAY, LIGHT_RED, LIGHT_GREEN, LIGHT_YELLOW, LIGHT_BLUE, LIGHT_MAGENTA, LIGHT_CYAN, WHITE = range(90, 98)
@ -550,7 +551,7 @@ class Fetcher(Worker):
address = args.address
index = args.index
if not address in config:
if address not in config:
config[address] = {}
self.orientation = config[address].get('Orientation', 'Landscape')
@ -868,7 +869,7 @@ HandlePressure = true
def run(self, init=None):
try:
self.cmdloop(init)
except KeyboardInterrupt as e:
except KeyboardInterrupt:
print('^C')
self.run('')