python: fix flake8 warnings and format with black
Most of the flake8 warnings in this repository were fairly trivial,
so fixed them. The "openbmctool" is 7000+ lines of pretty heavily
warned code, so just disabling that one. Format everything with
black.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Icb3f6ee9bf03dece58785f7af00617c87a84aa65
diff --git a/tof-voters/libvoters/subcmd/analyze-reviews.py b/tof-voters/libvoters/subcmd/analyze-reviews.py
index b3734b9..b3323fa 100644
--- a/tof-voters/libvoters/subcmd/analyze-reviews.py
+++ b/tof-voters/libvoters/subcmd/analyze-reviews.py
@@ -4,11 +4,12 @@
import json
import os
import re
-import libvoters.acceptable as acceptable
from collections import defaultdict
-from libvoters.time import timestamp, TimeOfDay
from typing import Dict
+import libvoters.acceptable as acceptable
+from libvoters.time import TimeOfDay, timestamp
+
class subcmd:
def __init__(self, parser: argparse._SubParsersAction) -> None:
@@ -42,7 +43,7 @@
if not os.path.isfile(path):
continue
- if not re.match("[0-9]*\.json", f):
+ if not re.match(r"[0-9]*\.json", f):
continue
with open(path, "r") as file: