Skip to content

Commit b644e2e

Browse files
authored
Python lint: Upgrade to flake8=7.1.1 (#1497)
1 parent ac2adfe commit b644e2e

File tree

2 files changed

+60
-17
lines changed

2 files changed

+60
-17
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
apt-get update -q
5151
apt-get install -q -y python3-pip
5252
- run: python3 -m pip install --upgrade pip
53-
- run: python3 -m pip install flake8==3.9.2
53+
- run: python3 -m pip install flake8==7.1.1
5454
- run: python3 -m flake8 --show-source --statistics --extend-exclude=./scripts
5555

5656
test-linux:

.flake8

Lines changed: 59 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,67 @@
11
[flake8]
2-
ignore =
3-
E111, # Indentation is not a multiple of four
4-
E114, # Indentation is not a multiple of four (comment)
5-
E501, # Line too long
6-
E121, # Continuation line under-indented for hanging indent
7-
E722 # bare excepts
8-
E741, # Variable names such as 'l', 'O', or 'I'
2+
# E111: Indentation is not a multiple of four
3+
# E114: Indentation is not a multiple of four (comment)
4+
# E121: Continuation line under-indented for hanging indent
5+
# E122: continuation line missing indentation or outdented
6+
# E126: continuation line over-indented for hanging indent
7+
# E127: continuation line over-indented for visual indent
8+
# E128: continuation line under-indented for visual indent
9+
# E201: whitespace after '['
10+
# E202: whitespace before ']'
11+
# E203: whitespace before ':'
12+
# E211: whitespace before '('
13+
# E221: multiple spaces before operator
14+
# E226: missing whitespace around arithmetic operator
15+
# E228: missing whitespace around modulo operator
16+
# E231: missing whitespace after ','
17+
# E241: multiple spaces after ','
18+
# E251: unexpected spaces around keyword / parameter equals
19+
# E261: at least two spaces before inline comment
20+
# E262: inline comment should start with '# '
21+
# E266: too many leading '#' for block comment
22+
# E271: multiple spaces after keyword
23+
# E301: expected 1 blank line, found 0
24+
# E302: expected 2 blank lines, found 1
25+
# E303: too many blank lines (2)
26+
# E305: expected 2 blank lines after class or function definition, found 1
27+
# E306: expected 1 blank line before a nested definition, found 0
28+
# E402: module level import not at top of file
29+
# E501: Line too long
30+
# E704: multiple statements on one line (def)
31+
# E713: test for membership should be 'not in'
32+
# E721: do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`
33+
# E722: bare excepts
34+
# E731: do not assign a lambda expression, use a def
35+
# E741: Variable names such as 'l', 'O', or 'I'
36+
# F401: 'pip._internal.cli.index_command.SessionCommandMixin' imported but unused
37+
# F403: 'from .core import *' used; unable to detect undefined names
38+
# F405: 'encode' may be undefined, or defined from star imports: .codec, .core
39+
# F541: f-string is missing placeholders
40+
# F811: redefinition of unused 'Console' from line 8
41+
# F821: undefined name 'basestring'
42+
# F841: local variable 'foos' is assigned to but never used
43+
# W291: trailing whitespace
44+
# W391: blank line at end of file
45+
# W503: line break before binary operator
46+
# W504: line break after binary operator
47+
ignore = E111, E114, E121, E122, E126, E127, E128, E201, E202, E203, E211, E221, E226,
48+
E228, E231, E241, E251, E261, E262, E266, E271, E301, E302, E303, E305, E306, E402,
49+
E501, E704, E713, E721, E722, E731, E741, F401, F403, F405, F541, F811, F821, F841,
50+
W291, W391, W503, W504
51+
952
exclude =
10-
./llvm,
11-
./gnu,
12-
./upstream,
13-
./fastcomp,
14-
./fastcomp-clang,
15-
./releases,
53+
./binaryen,
1654
./clang,
55+
./crunch,
56+
./downloads,
1757
./emscripten,
18-
./binaryen,
58+
./fastcomp-clang,
59+
./fastcomp,
1960
./git,
61+
./gnu,
62+
./llvm,
2063
./node,
2164
./python,
65+
./releases,
2266
./temp,
23-
./downloads,
24-
./crunch,
67+
./upstream,

0 commit comments

Comments
 (0)