Python: Fix some Ql4Ql violations.#20330
Merged
michaelnebel merged 2 commits intogithub:mainfrom Sep 2, 2025
Merged
Conversation
53cd6f9 to
dbd3125
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes various Ql4Ql violations across multiple Python CodeQL files, focusing on code quality improvements such as simplifying conditions, renaming parameters for consistency, fixing typos, and removing unused variables.
- Simplified conditional expressions by removing unnecessary variables and if-then-else constructs
- Fixed parameter naming inconsistencies in documentation and function signatures
- Corrected spelling errors in comments and documentation
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| TarSlipImprov.ql | Simplified exists condition by removing unused variable |
| FluentApiModel.qll | Renamed module for naming convention compliance and added deprecated alias |
| FunctionObject.qll | Renamed parameter for consistency and simplified function signature |
| ObjectInternal.qll | Fixed parameter naming in documentation |
| Stdlib.qll | Removed unused field variable and simplified condition |
| DataFlowPrivate.qll | Fixed parameter names in documentation comments |
| HashlibModule.qll | Fixed typo in comment |
| CryptographyModule.qll | Simplified if-then-else conditions |
| CryptoArtifact.qll | Fixed typo in comment |
| private module InsecureContextFlow = DataFlow::GlobalWithState<InsecureContextConfig>; | ||
|
|
||
| /** | ||
| * Holds if `conectionCreation` marks the creation of a connection based on the contex |
There was a problem hiding this comment.
There are spelling errors in the comment: 'conectionCreation' should be 'connectionCreation' and 'contex' should be 'context'.
Suggested change
| * Holds if `conectionCreation` marks the creation of a connection based on the contex | |
| * Holds if `connectionCreation` marks the creation of a connection based on the context |
aschackmull
reviewed
Sep 2, 2025
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
aschackmull
approved these changes
Sep 2, 2025
This file contains hidden or 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
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.
Fix some Ql4Ql violations based on the following checks
ql/field-only-used-in-charpredql/could-be-castql/counting-to-zeroql/dataflow-module-naming-conventionql/if-with-noneql/missing-parameter-qldocql/misspellingDCA looks good.