diff --git a/setup.cfg b/setup.cfg index 6ce66a6f2bdbd..d278deac66f43 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 @@ -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