Skip to content
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

Merged
merged 2 commits into from
Sep 20, 2022
Merged

Conversation

asottile-sentry
Copy link
Member

@asottile-sentry asottile-sentry commented Sep 12, 2022

noqa removal was automated via yesqa

@@ -1,16 +1,17 @@
[flake8]
ignore =
Copy link
Member Author

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

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)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ini comments are either # or ; not // -- these are actually being interpreted as ignore codes https://flake8.pycqa.org/en/latest/user/configuration.html

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
Copy link
Member Author

Choose a reason for hiding this comment

The 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

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
exclude=checkouts,lol*,.tox
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extend-exclude is better as it preserves the default exclude list

sentry_sdk/api.py Show resolved Hide resolved
@asottile-sentry asottile-sentry marked this pull request as ready for review September 12, 2022 16:59
@asottile-sentry asottile-sentry requested a review from a team September 13, 2022 21:03
@asottile-sentry asottile-sentry enabled auto-merge (squash) September 14, 2022 00:02
@antonpirker
Copy link
Member

Thanks for this update @asottile-sentry !
I will review this after DjangoCon

@asottile-sentry asottile-sentry merged commit 3096b40 into master Sep 20, 2022
@asottile-sentry asottile-sentry deleted the asottile-flake8-5 branch September 20, 2022 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants