summaryrefslogtreecommitdiff
path: root/buildscripts/promote_silent_failures.py
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2018-03-27 14:30:46 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2018-04-05 14:41:58 -0400
commitc50c68fef179d9306f1a3432f48985bf20555e38 (patch)
treea1c208329a090c54a8a1f02558b2be87b830a8ab /buildscripts/promote_silent_failures.py
parenta5dacf7092f51055dd774a1911a48815bb9a1e0e (diff)
downloadmongo-c50c68fef179d9306f1a3432f48985bf20555e38.tar.gz
SERVER-23312 Python linting - Lint using pylint, pydocstyle & mypy
Diffstat (limited to 'buildscripts/promote_silent_failures.py')
-rw-r--r--buildscripts/promote_silent_failures.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/buildscripts/promote_silent_failures.py b/buildscripts/promote_silent_failures.py
index 81bdb72e694..cf1ddab7c7a 100644
--- a/buildscripts/promote_silent_failures.py
+++ b/buildscripts/promote_silent_failures.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python
-"""
-Converts silent test failures into non-silent failures.
+"""Convert silent test failures into non-silent failures.
Any test files with at least 2 executions in the report.json file that have a "silentfail" status,
this script will change the outputted report to have a "fail" status instead.
@@ -22,11 +21,13 @@ if __name__ == "__main__" and __package__ is None:
def read_json_file(json_file):
+ """Return contents of a JSON file."""
with open(json_file) as json_data:
return json.load(json_data)
def main():
+ """Execute Main program."""
usage = "usage: %prog [options] report.json"
parser = optparse.OptionParser(usage=usage)