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
CodeQL fixes and other misc. cleanups #168
Merged
Merged
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
glx22
reviewed
Nov 4, 2020
This was missed in the recent commit a1d23b6: "Codechange: Various non-formatting related flake8 fixes"
There will only be an error here if the value isn't an integer. The only values with defined meanings are 0 or 1, so in this case there's an error in the source and we should fail compilation.
Found by CodeQL.
This doesn't fix some circular-import issues that will need more refactoring to avoid.
Resolves all issues from the `flake8-comprehensions` plugin.
This conforms with the PEP 8 recommendations, and also sorts them alphabetically because it's opinionated. :p This is the result of running `isort` and then `black`, unfortunately they fight with each other about formatting...
The uninitialized-variable checker doesn't understand the control flow well enough (in one case it's very implicit, the others are obvious).
Found by CodeQL.
FLHerne
force-pushed
the
flh-codeql-fixes
branch
from
November 8, 2020 19:06
bbfd4c9
to
9b2a9f1
Compare
FLHerne
changed the title
WIP: Various CodeQL fixes
CodeQL fixes and other misc. cleanups
Nov 8, 2020
FLHerne
force-pushed
the
flh-codeql-fixes
branch
from
November 8, 2020 19:11
9b2a9f1
to
c7c7347
Compare
This resoolves the CodeQL warning: Assignment overwrites attribute comment, which was previously defined in superclass. Subclasses should not set attributes that are set in the superclass. Doing so may violate invariants in the superclass.
This might also squash a false-positive CodeQL warning, not sure yet.
This might fix some CodeQL false-positives.
FLHerne
force-pushed
the
flh-codeql-fixes
branch
from
November 8, 2020 19:24
c7c7347
to
8307c2f
Compare
Note: the three "failing" CodeQL errors are the ones that I added suppression comments to, because of this bizarre design choice: |
LordAro
approved these changes
Nov 8, 2020
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.
LGTM
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.
No description provided.