Skip to content
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

Fixes for pylint 2.17.2 (Fedora 38) #5708

Closed
wants to merge 4 commits into from

Conversation

dgibson
Copy link
Contributor

@dgibson dgibson commented Jun 22, 2023

make check on the avocado sources fails on Fedora 38 due to pylint errors. This seems to be because of new warnings introduced with a newer pylint. Fix them.

pylint 2.17.2 (Fedora 38) seems to complain about this.

Signed-off-by: David Gibson <[email protected]>
Several tests in selftests/.data/test_statuses.py log a message after
calling sys.exit(), which causes 2.17.2 (Fedora 38) to complain about
unreachable code.

It looks like these messages are here so we can see what's happening if
sys.exit() were ever to *not* behave as we expect, so we don't want to
remove then.  Instead use a pylint suppression.

Signed-off-by: David Gibson <[email protected]>
pylint 2.17.2 (Fedora 38) gives warnings if the exception classes specified
in the overgeneral-exceptions option of the config don't give a module.
Fully qualify them with 'builtins.' to stop this warning.

Signed-off-by: David Gibson <[email protected]>
pylint 2.17.2 (Fedora 38) complains about places that raise an overly broad
exception, such as bare 'Exception' rather than a derived class.  Change
most places that do that to raise an appropriate derived class.  One
remaining place appears to be deliberately raising the generic exception,
so use a pylint suppression there instead.

Signed-off-by: David Gibson <[email protected]>
@dgibson
Copy link
Contributor Author

dgibson commented Jun 22, 2023

Ah, dang it. Thought my pull was up to date, but it wasn't, so I failed to spot these were already fixed upstream.

@dgibson dgibson closed this Jun 22, 2023
@dgibson dgibson deleted the pylint branch June 22, 2023 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant