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

Ignore flake8 warnings about assert False #6602

Merged
merged 2 commits into from Mar 29, 2019
Merged

Ignore flake8 warnings about assert False #6602

merged 2 commits into from Mar 29, 2019

Conversation

msullivan
Copy link
Collaborator

No description provided.

@msullivan
Copy link
Collaborator Author

(Maybe we should pin a flake8 version?)

@@ -41,7 +41,8 @@ exclude =
# B3??: Python 3 compatibility warnings
# B006: use of mutable defaults in function signatures
# B007: Loop control variable not used within the loop body.
ignore = E251,E128,F401,W601,E701,W503,W504,E704,E402,B3,B006,B007
# B011: Don't use assert False
Copy link
Member

Choose a reason for hiding this comment

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

What does flake8 want you to use???

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do not call assert False since python -O removes these calls. Instead callers should raise AssertionError().

@gvanrossum
Copy link
Member

gvanrossum commented Mar 29, 2019

(Maybe we should pin a flake8 version?)

Pinning deps seems to be a trend. :-) Though we should also strive to upgrade our dependencies regularly, which may become yet more busywork.

Also, the flake errors that this failed on look reasonable. Just poorly timed during our release cycle. :-)

@msullivan
Copy link
Collaborator Author

Also, the flake errors that this failed on look reasonable. Just poorly timed during our release cycle. :-)

Yeah. I am going to suppress them in config anyways, because of release cycle concerns, and then go back and actually fix them.

@msullivan
Copy link
Collaborator Author

(The new errors come from flake8-bugbear, it seems)

@msullivan
Copy link
Collaborator Author

Also, the flake errors that this failed on look reasonable. Just poorly timed during our release cycle. :-)

Yeah. I am going to suppress them in config anyways, because of release cycle concerns, and then go back and actually fix them.

Actually, in going to fix them, I've changed my mind. Basically every fix is adding either # type: ignore or # noqa. Might as well just keep it ignored.

@msullivan msullivan merged commit a213ccb into master Mar 29, 2019
@msullivan msullivan deleted the flake8-chill branch March 29, 2019 00:44
@gvanrossum
Copy link
Member

Actually, in going to fix them, I've changed my mind. Basically every fix is adding either # type: ignore or # noqa. Might as well just keep it ignored.

Hm, the ones about getattr(x, 'name') being in all ways inferior to x.name are correct, so those should be fixed using that substitution.

JukkaL pushed a commit that referenced this pull request Mar 29, 2019
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.

None yet

2 participants