Skip to content

Commit 2aa306f

Browse files
authored
STYLE: Remove in-line comments in flake8 configuration (#42146)
1 parent 3f10d51 commit 2aa306f

File tree

1 file changed

+50
-25
lines changed

1 file changed

+50
-25
lines changed

setup.cfg

+50-25
Original file line numberDiff line numberDiff line change
@@ -71,28 +71,44 @@ parentdir_prefix = pandas-
7171
[flake8]
7272
max-line-length = 88
7373
ignore =
74-
E203, # space before : (needed for how black formats slicing)
75-
W503, # line break before binary operator
76-
W504, # line break after binary operator
77-
E402, # module level import not at top of file
78-
E731, # do not assign a lambda expression, use a def
79-
S001, # found modulo formatter (incorrect picks up mod operations)
80-
B005, # controversial
81-
B006, # controversial
82-
B007, # controversial
83-
B008, # controversial
84-
B009, # setattr is used to side-step mypy
85-
B010, # getattr is used to side-step mypy
86-
B011, # tests use assert False
87-
B015, # tests use comparisons but not their returned value
88-
B301 # false positives
74+
# space before : (needed for how black formats slicing)
75+
E203,
76+
# line break before binary operator
77+
W503,
78+
# line break after binary operator
79+
W504,
80+
# module level import not at top of file
81+
E402,
82+
# do not assign a lambda expression, use a def
83+
E731,
84+
# found modulo formatter (incorrect picks up mod operations)
85+
S001,
86+
# controversial
87+
B005,
88+
# controversial
89+
B006,
90+
# controversial
91+
B007,
92+
# controversial
93+
B008,
94+
# setattr is used to side-step mypy
95+
B009,
96+
# getattr is used to side-step mypy
97+
B010,
98+
# tests use assert False
99+
B011,
100+
# tests use comparisons but not their returned value
101+
B015,
102+
# false positives
103+
B301
89104
exclude =
90105
doc/sphinxext/*.py,
91106
doc/build/*.py,
92107
doc/temp/*.py,
93108
.eggs/*.py,
94109
versioneer.py,
95-
env # exclude asv benchmark environments from linting
110+
# exclude asv benchmark environments from linting
111+
env
96112
per-file-ignores =
97113
# private import across modules
98114
pandas/tests/*:PDF020
@@ -109,18 +125,27 @@ max-line-length = 84
109125
bootstrap =
110126
import numpy as np
111127
import pandas as pd
112-
np # avoiding error when importing again numpy or pandas
113-
pd # (in some cases we want to do it to show users)
128+
# avoiding error when importing again numpy or pandas
129+
np
130+
# (in some cases we want to do it to show users)
131+
pd
114132
ignore =
115-
E203, # space before : (needed for how black formats slicing)
116-
E402, # module level import not at top of file
117-
W503, # line break before binary operator
133+
# space before : (needed for how black formats slicing)
134+
E203,
135+
# module level import not at top of file
136+
E402,
137+
# line break before binary operator
138+
W503,
118139
# Classes/functions in different blocks can generate those errors
119-
E302, # expected 2 blank lines, found 0
120-
E305, # expected 2 blank lines after class or function definition, found 0
140+
# expected 2 blank lines, found 0
141+
E302,
142+
# expected 2 blank lines after class or function definition, found 0
143+
E305,
121144
# We use semicolon at the end to avoid displaying plot objects
122-
E703, # statement ends with a semicolon
123-
E711, # comparison to none should be 'if cond is none:'
145+
# statement ends with a semicolon
146+
E703,
147+
# comparison to none should be 'if cond is none:'
148+
E711,
124149
exclude =
125150
doc/source/development/contributing_docstring.rst,
126151
# work around issue of undefined variable warnings

0 commit comments

Comments
 (0)