-
Notifications
You must be signed in to change notification settings - Fork 97
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
Enable many ruff checks #476
Draft
inknos
wants to merge
19
commits into
containers:main
Choose a base branch
from
inknos:enable-many-ruff-checks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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
Signed-off-by: Nicola Sella <[email protected]>
Signed-off-by: Nicola Sella <[email protected]>
Signed-off-by: Nicola Sella <[email protected]>
Signed-off-by: Nicola Sella <[email protected]>
Catching BaseException can make it hard to interrupt the program (e.g., with Ctrl-C) and can disguise other problems. Signed-off-by: Nicola Sella <[email protected]>
Checks for the use of the characters 'l', 'O', or 'I' as variable names. Signed-off-by: Nicola Sella <[email protected]>
E402: module-import-not-at-top-of-file S101: assert Assertions are removed when Python is run with optimization requested (i.e., when the -O flag is present), which is a common practice in production environments. As such, assertions should not be used for runtime validation of user input or to enforce interface constraints. Signed-off-by: Nicola Sella <[email protected]>
Check for unused variables. Unused variables should be prefixed with '_' Signed-off-by: Nicola Sella <[email protected]>
More on why it is bad here: https://docs.astral.sh/ruff/rules/redefined-loop-name/ Signed-off-by: Nicola Sella <[email protected]>
Signed-off-by: Nicola Sella <[email protected]>
Signed-off-by: Nicola Sella <[email protected]>
This is a quality of life improvement and it should be backward compatible with our previous set line-length Signed-off-by: Nicola Sella <[email protected]>
Fix sys.version_info comparisons and drop unsupported python code Furthermore, addresses UP008: super-call-with-parameters Super is not called with parameters anymore when the first argument is __class__ and the second argument is equivalent to the first argument of the enclosing method Signed-off-by: Nicola Sella <[email protected]>
It is recommended to use 2 or more to give the caller more context about warning Signed-off-by: Nicola Sella <[email protected]>
B024: abstract-base-class-without-abstract-method PodmanResource is not an abstract class and the ABC inheritance should be removed Signed-off-by: Nicola Sella <[email protected]>
Bugbear checks usually check for design problems within the code. https://pypi.org/project/flake8-bugbear/ Signed-off-by: Nicola Sella <[email protected]>
This could be an exception and should be checked in the future but it is suppressed at the moment. Signed-off-by: Nicola Sella <[email protected]>
S603: subprocess-without-shell-equals-true This could be an exception or a false positive and since it's used on one single piece of code it is ok to ignore from now. Signed-off-by: Nicola Sella <[email protected]>
Bandit provides security checks and good practices suggestions for the codebase. https://pypi.org/project/flake8-bandit/ Signed-off-by: Nicola Sella <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: inknos The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
15 tasks
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.
Depends on #473