aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.flake85
-rw-r--r--python/tidy/tidy.py8
2 files changed, 6 insertions, 7 deletions
diff --git a/.flake8 b/.flake8
new file mode 100644
index 00000000000..5815831b1af
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,5 @@
+[flake8]
+ignore =
+ W291, # trailing whitespace; the standard tidy process will enforce no trailing whitespace
+ W503, # linebreak before binary operator; replaced by W504 - linebreak after binary operator
+ E501, # 80 character line length; the standard tidy process will enforce line length \ No newline at end of file
diff --git a/python/tidy/tidy.py b/python/tidy/tidy.py
index 1e5de4080c0..e0d09f4a7ea 100644
--- a/python/tidy/tidy.py
+++ b/python/tidy/tidy.py
@@ -325,15 +325,9 @@ def check_flake8(file_name, contents):
if not file_name.endswith(".py"):
return
- ignore = {
- "W291", # trailing whitespace; the standard tidy process will enforce no trailing whitespace
- "W503", # linebreak before binary operator; replaced by W504 - linebreak after binary operator
- "E501", # 80 character line length; the standard tidy process will enforce line length
- }
-
output = ""
try:
- args = ["flake8", "--ignore=" + ",".join(ignore), file_name]
+ args = ["flake8", file_name]
subprocess.check_output(args, universal_newlines=True)
except subprocess.CalledProcessError as e:
output = e.output