-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix flake8-bugbear warnings #4168
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
B015 Pointless comparison. Did you mean to assign a value? Otherwise, prepend `assert` or remove it.
B010 Do not call `setattr` with a constant attribute value. It is not any safer than normal property access.
B009 Do not call `getattr` with a constant attribute value. It is not any safer than normal property access.
B033 Sets should not contain duplicate item `"anyOf"`
DimitriPapadopoulos
force-pushed
the
bugbear
branch
from
January 2, 2024 19:09
94cba4d
to
c896b46
Compare
B006 Do not use mutable data structures for argument defaults
B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
DimitriPapadopoulos
force-pushed
the
bugbear
branch
from
January 2, 2024 19:15
c896b46
to
68a2356
Compare
abravalheri
reviewed
Jan 3, 2024
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.
Thank you very much @DimitriPapadopoulos for the valuable contribution.
Please see my comments below.
Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com>
abravalheri
reviewed
Jan 3, 2024
Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com>
Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com>
2 tasks
DimitriPapadopoulos
force-pushed
the
bugbear
branch
from
January 3, 2024 21:55
6cd16cf
to
efb7997
Compare
The whole idea was to cache the result of a couple functions, do that explictly with @functools.lru_cache.
DimitriPapadopoulos
force-pushed
the
bugbear
branch
from
January 4, 2024 19:35
efb7997
to
528b60b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
Fix flake8-bugbear issues reported by ruff 0.1.9.
Pull Request Checklist
newsfragments/
.(See documentation for details)