From b6e846a301af5928d519972b445737191b94a581 Mon Sep 17 00:00:00 2001 From: Gabriele Quaresima Date: Mon, 12 Dec 2022 11:33:54 +0100 Subject: [PATCH] review: rename variable and add .gitignore --- .gitignore | 2 ++ summarize_test_results.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..69adda3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# editor and IDE paraphernalia +.idea diff --git a/summarize_test_results.py b/summarize_test_results.py index d1a4182..ad5d946 100644 --- a/summarize_test_results.py +++ b/summarize_test_results.py @@ -109,8 +109,8 @@ def is_test_artifact(test_entry): "repo", "branch", ] - for kw in should_have: - if kw not in test_entry: + for field in should_have: + if field not in test_entry: return False return True @@ -415,7 +415,7 @@ def format_by_test(summary, structure, file_out=None): def format_duration(duration): - "pretty-print duration" + """pretty-print duration""" minutes = duration.seconds // 60 seconds = duration.seconds % 60 return f"{minutes} min {seconds} sec"