Skip to content

Commit 643aad1

Browse files
Enable additional flake8 rules
1 parent f020aca commit 643aad1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

contrib/devtools/lint-python.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,28 @@
1515
# E133 closing bracket is missing indentation
1616
# E223 tab before operator
1717
# E224 tab after operator
18+
# E242 tab after ','
19+
# E266 too many leading '#' for block comment
1820
# E271 multiple spaces after keyword
1921
# E272 multiple spaces before keyword
2022
# E273 tab after keyword
2123
# E274 tab before keyword
2224
# E275 missing whitespace after keyword
2325
# E304 blank lines found after function decorator
2426
# E306 expected 1 blank line before a nested definition
27+
# E401 multiple imports on one line
28+
# E402 module level import not at top of file
2529
# E502 the backslash is redundant between brackets
30+
# E701 multiple statements on one line (colon)
2631
# E702 multiple statements on one line (semicolon)
2732
# E703 statement ends with a semicolon
2833
# E714 test for object identity should be "is not"
2934
# E721 do not compare types, use "isinstance()"
3035
# E741 do not use variables named "l", "O", or "I"
3136
# E742 do not define classes named "l", "O", or "I"
3237
# E743 do not define functions named "l", "O", or "I"
38+
# E901 SyntaxError: invalid syntax
39+
# E902 TokenError: EOF in multi-line string
3340
# F401 module imported but unused
3441
# F402 import module from line N shadowed by loop variable
3542
# F404 future import(s) name after other statements
@@ -49,16 +56,19 @@
4956
# F707 an except: block as not the last exception handler
5057
# F811 redefinition of unused name from line N
5158
# F812 list comprehension redefines 'foo' from line N
59+
# F821 undefined name 'Foo'
5260
# F822 undefined name name in __all__
5361
# F823 local variable name … referenced before assignment
5462
# F831 duplicate argument name in function definition
5563
# F841 local variable 'foo' is assigned to but never used
5664
# W292 no newline at end of file
65+
# W293 blank line contains whitespace
5766
# W504 line break after binary operator
5867
# W601 .has_key() is deprecated, use "in"
5968
# W602 deprecated form of raising exception
6069
# W603 "<>" is deprecated, use "!="
6170
# W604 backticks are deprecated, use "repr()"
6271
# W605 invalid escape sequence "x"
72+
# W606 'async' and 'await' are reserved keywords starting with Python 3.7
6373

64-
flake8 --ignore=B,C,E,F,I,N,W --select=E112,E113,E115,E116,E125,E131,E133,E223,E224,E271,E272,E273,E274,E275,E304,E306,E502,E702,E703,E714,E721,E741,E742,E743,F401,F402,F404,F406,F407,F601,F602,F621,F622,F631,F701,F702,F703,F704,F705,F706,F707,F811,F812,F822,F823,F831,F841,W292,W504,W601,W602,W603,W604,W605 .
74+
flake8 --ignore=B,C,E,F,I,N,W --select=E112,E113,E115,E116,E125,E131,E133,E223,E224,E242,E266,E271,E272,E273,E274,E275,E304,E306,E401,E402,E502,E701,E702,E703,E714,E721,E741,E742,E743,F401,E901,E902,F402,F404,F406,F407,F601,F602,F621,F622,F631,F701,F702,F703,F704,F705,F706,F707,F811,F812,F821,F822,F823,F831,F841,W292,W293,W504,W601,W602,W603,W604,W605,W606 .

0 commit comments

Comments
 (0)