← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:flake8-config into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:flake8-config into launchpad:master.

Commit message:
Add flake8 configuration

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/406296

This gives us a common base to work from in order to get to a target of zero lint.  I turned off quite a few pure whitespace issues that should be amenable to automatic cleanup later.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:flake8-config into launchpad:master.
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..bfc4a21
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,53 @@
+[flake8]
+# These Python 2 builtins are needed until such time as we finish moving to
+# Python 3.
+builtins =
+    file,
+    long
+hang-closing = true
+ignore =
+    # Skip all the pure whitespace issues for now.  There are too many of
+    # them to be worth fixing manually, and most of them will get sorted out
+    # automatically when we eventually switch to black.
+    E111,
+    E114,
+    E115,
+    E116,
+    E117,
+    E121,
+    E122,
+    E124,
+    E125,
+    E126,
+    E127,
+    E128,
+    E129,
+    E131,
+    E133,
+    E201,
+    E202,
+    E211,
+    E221,
+    E222,
+    E225,
+    E226,
+    E227,
+    E231,
+    E241,
+    E251,
+    E261,
+    E262,
+    E265,
+    E266,
+    E271,
+    E302,
+    E303,
+    E305,
+    E306,
+    # ==/!= comparisons with True/False/None are common idioms with Storm.
+    E711,
+    E712,
+    # Don't enforce either position of line breaks relative to binary
+    # operators, at least for now.
+    W503,
+    W504