-
Notifications
You must be signed in to change notification settings - Fork 343
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
Avocado utils lint warnings #6041
Avocado utils lint warnings #6041
Conversation
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.
Hi @clebergnu, thank you for this update. The changes LGTM, I am just missing the update to avocado-static-checks.conf file which would enable this configuration in our selftests. IIUIC without it your changes are not properly tested in CI, am I right?
For the sake of incorporating a fix on check-lint, where the return code signals any failures in the executed checks, as opposed to just the last check. Signed-off-by: Cleber Rosa <crosa@redhat.com>
In order to have "avocado/utils" in a way that can be easily transported to the autils project, it's necessary to have the closest lint configuration possible (ideally, the same). This introduces a configuration file that is a copy of the existing ".pylintrc" file. The goal is that further commits will address other warnings and bring the exceptions as close as possible to the "avocado-static-checks" default pylint configuration file, which has no exceptions. Signed-off-by: Cleber Rosa <crosa@redhat.com>
For this change, there was the possibility of making changes compatible with "logging-format-style=old" (the default), or jumping the gun and making changes compatible with "logging-format-style=new". The earlier approach was chosen because the goal is to get closer to: * A default pylint configuration (as shipped/generated by pylint itself) * The configuration provided by avocado-static-checks and used by autils Reference: https://pylint.pycqa.org/en/latest/user_guide/messages/warning/logging-fstring-interpolation.html Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reference: https://pylint.pycqa.org/en/latest/user_guide/messages/warning/raise-missing-from.html Signed-off-by: Cleber Rosa <crosa@redhat.com>
The "broad-except" has been renamed to "broad-exception-caught", warning number W0718. So it can be removed from the configuration file. Reference: https://pylint.pycqa.org/en/latest/user_guide/messages/warning/broad-except.html Signed-off-by: Cleber Rosa <crosa@redhat.com>
There are a few occurrences where code is being used to keep track of possible improvements. Many times these will go unnoticed for ages. Let's either document the limitations that are affected by the "TODO"s, or remove them because after quite some time, they were not something that was attempted to be improved or fixed. https://pylint.pycqa.org/en/latest/user_guide/messages/warning/fixme.html Signed-off-by: Cleber Rosa <crosa@redhat.com>
No occurrence of this warning was found in avocado/utils. Reference: https://pylint.pycqa.org/en/latest/user_guide/messages/warning/protected-access.html Signed-off-by: Cleber Rosa <crosa@redhat.com>
3db595d
to
f8537a5
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6041 +/- ##
==========================================
- Coverage 54.47% 54.42% -0.05%
==========================================
Files 202 202
Lines 21874 21885 +11
==========================================
- Hits 11915 11911 -4
- Misses 9959 9974 +15 ☔ View full report in Codecov by Sentry. |
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, thank you for the update.
This solves the lint warnings, removing all check exceptions from the pylint configuration for
avocado/utils
.This is part of: #6034