-
Notifications
You must be signed in to change notification settings - Fork 231
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
Bump linter versions. #1112
Merged
Merged
Bump linter versions. #1112
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
rjeffman
force-pushed
the
future_pylint
branch
2 times, most recently
from
July 13, 2023 16:06
583036c
to
59d1da2
Compare
rjeffman
force-pushed
the
future_pylint
branch
from
September 8, 2023 14:41
59d1da2
to
09f4116
Compare
Recent pylint versions warns when a dictionaire is created using 'dict()' instead of '{...}'. Using 'dict()' in ansible-freeipa modules actually enhances readability, so this change disables the check for 'use-dict-literal' in pylint.
Recent pylint versions warn against the use of an 'else' in a 'try-except' block if using a 'return' on the 'except' part is is the idom used by ansible-freeipa when retrieving IPA data objects. This change removes the usage of the 'else:' in such cases, and modify the templates so that new modules do not have the same issue in the future.
In recent pylint versions, use of broad exceptions for both raise and try/except blocks raise a linter warning. As its use is justifiable in the case of ipavault, the warnings are disabled where they occur.
Changing the use of 'Exception' to 'RuntimeError' has the benefits of making the error more specific and meaningful for what is being reported and to remove warnings from linters (pylint). The same change is applied to all deployment roles.
This patch removes unnecessary usage of parens on attributions.
Update versions for linters and pre-commit checks, and fix ansible-lint execution.
Change pylint version to match latest version on Fedora 38.
rjeffman
force-pushed
the
future_pylint
branch
from
September 11, 2023 15:01
09f4116
to
6e1f9f1
Compare
/azp run CheckPR |
Azure Pipelines successfully started running 1 pipeline(s). |
t-woerner
approved these changes
Sep 25, 2023
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.
In recent pylint versions more checks are being triggered by current ansible-freeipa code. This PR fixes or disables all new warnings found with:
The linter versions are updated for development requirements, pre-commit checks and upstream CI.
Details can be found on the individual commit messages.