Skip to content

ref: upgrade linters to flake8 5.x#1610

Merged
asottile-sentry merged 2 commits into
masterfrom
asottile-flake8-5
Sep 20, 2022
Merged

ref: upgrade linters to flake8 5.x#1610
asottile-sentry merged 2 commits into
masterfrom
asottile-flake8-5

Conversation

@asottile-sentry

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

Copy link
Copy Markdown
Contributor

noqa removal was automated via yesqa

Comment thread .flake8
@@ -1,16 +1,17 @@
[flake8]
ignore =

Copy link
Copy Markdown
Contributor 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

Comment thread .flake8
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
Copy Markdown
Contributor 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

Comment thread .flake8
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
Copy Markdown
Contributor 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

Comment thread .flake8
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
Copy Markdown
Contributor 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

Comment thread sentry_sdk/api.py
@asottile-sentry
asottile-sentry marked this pull request as ready for review September 12, 2022 16:59
Comment thread linter-requirements.txt
@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
Copy Markdown
Contributor

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