summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert JW Regeer <bertjw@regeer.org>2018-10-14 20:09:37 -0600
committerBert JW Regeer <bertjw@regeer.org>2018-10-14 20:09:37 -0600
commit9e4ccfb38408a0d5dc06747711f65df27ebee2ba (patch)
treeb66392a58096e3f20162c683bbbe9f080d4d6c67
parente69621940e63ee8f72b26022bf0670db2776fa32 (diff)
downloadwebob-9e4ccfb38408a0d5dc06747711f65df27ebee2ba.tar.gz
Add flake8 rules used by project
-rw-r--r--.flake819
-rw-r--r--tox.ini10
2 files changed, 25 insertions, 4 deletions
diff --git a/.flake8 b/.flake8
new file mode 100644
index 0000000..22f99ef
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,19 @@
+# Recommended flake8 settings while editing WebOb, we use Black for the final linting/say in how code is formatted
+#
+# pip install flake8 flake8-bugbear
+#
+# This will warn/error on things that black does not fix, on purpose
+
+[flake8]
+max-line-length = 80
+max-complexity = 12
+select = E,F,W,C,B,B9
+ignore =
+ # E123 closing bracket does not match indentation of opening bracket’s line
+ E123
+ # E203 whitespace before ‘:’ (Not PEP8 compliant, Python Black)
+ E203
+ # E501 line too long (82 > 79 characters) (replaced by B950 from flake8-bugbear, https://github.com/PyCQA/flake8-bugbear)
+ E501
+ # W503 line break before binary operator (Not PEP8 compliant, Python Black)
+ W503
diff --git a/tox.ini b/tox.ini
index 6c12679..37acde0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -54,9 +54,11 @@ deps =
readme_renderer
check-manifest
-[testenv:pep8]
-basepython = python3.6
-commands =
- flake8 src/webob/
+[testenv:run-flake8]
+skip_install = True
+basepython = python3.7
+commands =
+ flake8 src/webob/ tests
deps =
flake8
+ flake8-bugbear