Browse Source

Fix flake8 warnings

tags/nilmdb-2.0.3
Jim Paris 9 months ago
parent
commit
3738430103
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      nilmdb/cmdline/cmdline.py
  2. +1
    -1
      nilmdb/server/serverutil.py
  3. +1
    -1
      nilmdb/utils/timestamper.py

+ 1
- 1
nilmdb/cmdline/cmdline.py View File

@@ -66,7 +66,7 @@ class Complete():
layouts = []
for i in range(1, 10):
layouts.extend([(t + "_" + str(i)) for t in types])
return (l for l in layouts if l.startswith(prefix))
return (lay for lay in layouts if lay.startswith(prefix))

def meta_key(self, prefix, parsed_args, **kwargs):
return (kv.split('=')[0] for kv


+ 1
- 1
nilmdb/server/serverutil.py View File

@@ -189,7 +189,7 @@ def cherrypy_patch_exit():
if args.exc_type == CherryPyExit or args.exc_type == SystemExit:
return
sys.excepthook(args.exc_type, args.exc_value,
args.exc_traceback) # pragma: no cover
args.exc_traceback) # pragma: no cover
threading.excepthook = hook




+ 1
- 1
nilmdb/utils/timestamper.py View File

@@ -28,7 +28,7 @@ class Timestamper():
continue
# For some reason, coverage on python 3.8 reports that
# we never hit this break, even though we definitely do.
break # pragma: no cover
break # pragma: no cover
try:
return next(self.ts_iter) + line
except StopIteration:


Loading…
Cancel
Save