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

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 431a6589d72aae02d10f7b47c11a256de242d55e
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:flake8-config
Merge into: launchpad:master
Diff against target: 66 lines (+60/-0)
1 file modified
setup.cfg (+60/-0)
Reviewer Review Type Date Requested Status
Cristian Gonzalez (community) Approve
Review via email: mp+406296@code.launchpad.net

Commit message

Add flake8 configuration

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Cristian Gonzalez (cristiangsp) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/setup.cfg b/setup.cfg
2new file mode 100644
3index 0000000..c856fa8
4--- /dev/null
5+++ b/setup.cfg
6@@ -0,0 +1,60 @@
7+[flake8]
8+# These Python 2 builtins are needed until such time as we finish moving to
9+# Python 3.
10+builtins =
11+ file,
12+ long
13+exclude =
14+ # Code here is imported from elsewhere and may not necessarily conform
15+ # to Launchpad's style.
16+ lib/contrib
17+hang-closing = true
18+ignore =
19+ # Skip all the pure whitespace issues for now. There are too many of
20+ # them to be worth fixing manually, and most of them will get sorted out
21+ # automatically when we eventually switch to black.
22+ E111,
23+ E114,
24+ E115,
25+ E116,
26+ E117,
27+ E121,
28+ E122,
29+ E124,
30+ E125,
31+ E126,
32+ E127,
33+ E128,
34+ E129,
35+ E131,
36+ E133,
37+ E201,
38+ E202,
39+ E211,
40+ E221,
41+ E222,
42+ E225,
43+ E226,
44+ E227,
45+ E231,
46+ E241,
47+ E251,
48+ E261,
49+ E262,
50+ E265,
51+ E266,
52+ E271,
53+ E302,
54+ E303,
55+ E305,
56+ E306,
57+ # ==/!= comparisons with True/False/None are common idioms with Storm.
58+ E711,
59+ E712,
60+ # It's not obvious that forbidding assigning lambdas makes the affected
61+ # code much clearer.
62+ E731,
63+ # Don't enforce either position of line breaks relative to binary
64+ # operators, at least for now.
65+ W503,
66+ W504

Subscribers

People subscribed via source and target branches

to status/vote changes: