-
Notifications
You must be signed in to change notification settings - Fork 514
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
ref: upgrade linters to flake8 5.x #1610
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
[flake8] | ||
ignore = | ||
E203, // Handled by black (Whitespace before ':' -- handled by black) | ||
E266, // Handled by black (Too many leading '#' for block comment) | ||
E501, // Handled by black (Line too long) | ||
W503, // Handled by black (Line break occured before a binary operator) | ||
E402, // Sometimes not possible due to execution order (Module level import is not at top of file) | ||
E731, // I don't care (Do not assign a lambda expression, use a def) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ini comments are either |
||
B950, // Handled by black (Line too long by flake8-bugbear) | ||
B011, // I don't care (Do not call assert False) | ||
B014, // does not apply to Python 2 (redundant exception types by flake8-bugbear) | ||
N812, // I don't care (Lowercase imported as non-lowercase by pep8-naming) | ||
N804 // is a worse version of and conflicts with B902 (first argument of a classmethod should be named cls) | ||
max-line-length = 80 | ||
select = N,B,C,E,F,W,T4,B9 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this isn't necessary -- flake8 enables the codes of all extension by default |
||
exclude=checkouts,lol*,.tox | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extend-exclude is better as it preserves the default exclude list |
||
extend-ignore = | ||
# Handled by black (Whitespace before ':' -- handled by black) | ||
E203, | ||
# Handled by black (Line too long) | ||
E501, | ||
# Sometimes not possible due to execution order (Module level import is not at top of file) | ||
E402, | ||
# I don't care (Do not assign a lambda expression, use a def) | ||
E731, | ||
# does not apply to Python 2 (redundant exception types by flake8-bugbear) | ||
B014, | ||
# I don't care (Lowercase imported as non-lowercase by pep8-naming) | ||
N812, | ||
# is a worse version of and conflicts with B902 (first argument of a classmethod should be named cls) | ||
N804, | ||
extend-exclude=checkouts,lol* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
black==22.3.0 | ||
flake8==3.9.2 | ||
flake8-import-order==0.18.1 | ||
antonpirker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
flake8==5.0.4 | ||
mypy==0.961 | ||
types-certifi | ||
types-redis | ||
types-setuptools | ||
flake8-bugbear==21.4.3 | ||
pep8-naming==0.13.0 | ||
flake8-bugbear==22.9.11 | ||
pep8-naming==0.13.2 | ||
pre-commit # local linting |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,6 @@ | |
|
||
import sentry_sdk | ||
from sentry_sdk._compat import PY2 | ||
|
||
from sentry_sdk._types import MYPY | ||
|
||
if MYPY: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extend-ignore is better than ignore, it preserves the default ignore