Skip to content

STYLE: Remove in-line comments in flake8 configuration #42146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 50 additions & 25 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -71,28 +71,44 @@ parentdir_prefix = pandas-
[flake8]
max-line-length = 88
ignore =
E203, # space before : (needed for how black formats slicing)
W503, # line break before binary operator
W504, # line break after binary operator
E402, # module level import not at top of file
E731, # do not assign a lambda expression, use a def
S001, # found modulo formatter (incorrect picks up mod operations)
B005, # controversial
B006, # controversial
B007, # controversial
B008, # controversial
B009, # setattr is used to side-step mypy
B010, # getattr is used to side-step mypy
B011, # tests use assert False
B015, # tests use comparisons but not their returned value
B301 # false positives
# space before : (needed for how black formats slicing)
E203,
# line break before binary operator
W503,
# line break after binary operator
W504,
# module level import not at top of file
E402,
# do not assign a lambda expression, use a def
E731,
# found modulo formatter (incorrect picks up mod operations)
S001,
# controversial
B005,
# controversial
B006,
# controversial
B007,
# controversial
B008,
# setattr is used to side-step mypy
B009,
# getattr is used to side-step mypy
B010,
# tests use assert False
B011,
# tests use comparisons but not their returned value
B015,
# false positives
B301
exclude =
doc/sphinxext/*.py,
doc/build/*.py,
doc/temp/*.py,
.eggs/*.py,
versioneer.py,
env # exclude asv benchmark environments from linting
# exclude asv benchmark environments from linting
env
per-file-ignores =
# private import across modules
pandas/tests/*:PDF020
Expand All @@ -109,18 +125,27 @@ max-line-length = 84
bootstrap =
import numpy as np
import pandas as pd
np # avoiding error when importing again numpy or pandas
pd # (in some cases we want to do it to show users)
# avoiding error when importing again numpy or pandas
np
# (in some cases we want to do it to show users)
pd
ignore =
E203, # space before : (needed for how black formats slicing)
E402, # module level import not at top of file
W503, # line break before binary operator
# space before : (needed for how black formats slicing)
E203,
# module level import not at top of file
E402,
# line break before binary operator
W503,
# Classes/functions in different blocks can generate those errors
E302, # expected 2 blank lines, found 0
E305, # expected 2 blank lines after class or function definition, found 0
# expected 2 blank lines, found 0
E302,
# expected 2 blank lines after class or function definition, found 0
E305,
# We use semicolon at the end to avoid displaying plot objects
E703, # statement ends with a semicolon
E711, # comparison to none should be 'if cond is none:'
# statement ends with a semicolon
E703,
# comparison to none should be 'if cond is none:'
E711,
exclude =
doc/source/development/contributing_docstring.rst,
# work around issue of undefined variable warnings
Expand Down