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:
parent
146b480a84
commit
359502b134
|
@ -32,6 +32,7 @@ import configparser
|
||||||
|
|
||||||
CONFIG_PATH = os.path.join(xdg.BaseDirectory.xdg_data_home, 'tuhi-kete')
|
CONFIG_PATH = os.path.join(xdg.BaseDirectory.xdg_data_home, 'tuhi-kete')
|
||||||
|
|
||||||
|
|
||||||
class ColorFormatter(logging.Formatter):
|
class ColorFormatter(logging.Formatter):
|
||||||
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, LIGHT_GRAY = range(30, 38)
|
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)
|
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
|
address = args.address
|
||||||
index = args.index
|
index = args.index
|
||||||
|
|
||||||
if not address in config:
|
if address not in config:
|
||||||
config[address] = {}
|
config[address] = {}
|
||||||
|
|
||||||
self.orientation = config[address].get('Orientation', 'Landscape')
|
self.orientation = config[address].get('Orientation', 'Landscape')
|
||||||
|
@ -868,7 +869,7 @@ HandlePressure = true
|
||||||
def run(self, init=None):
|
def run(self, init=None):
|
||||||
try:
|
try:
|
||||||
self.cmdloop(init)
|
self.cmdloop(init)
|
||||||
except KeyboardInterrupt as e:
|
except KeyboardInterrupt:
|
||||||
print('^C')
|
print('^C')
|
||||||
self.run('')
|
self.run('')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue