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/report.py b/tof-voters/libvoters/subcmd/report.py
index 13726d9..87aa713 100644
--- a/tof-voters/libvoters/subcmd/report.py
+++ b/tof-voters/libvoters/subcmd/report.py
@@ -7,13 +7,10 @@
class subcmd:
def __init__(self, parser: argparse._SubParsersAction) -> None:
- p = parser.add_parser(
- "report", help="Create final report"
- )
+ p = parser.add_parser("report", help="Create final report")
p.set_defaults(cmd=self)
-
def run(self, args: argparse.Namespace) -> int:
commits_fp = os.path.join(args.dir, "commits.json")
reviews_fp = os.path.join(args.dir, "reviews.json")
@@ -43,10 +40,14 @@
qualified = points >= 15
- results[user] = { "qualified": qualified, "points": points,
- "commits": user_commits, "reviews": user_reviews }
+ results[user] = {
+ "qualified": qualified,
+ "points": points,
+ "commits": user_commits,
+ "reviews": user_reviews,
+ }
with open(os.path.join(args.dir, "report.json"), "w") as outfile:
- outfile.write(json.dumps(results, indent = 4))
+ outfile.write(json.dumps(results, indent=4))
return 0