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.
Added 3.11 to the Python versions we run pylint on.
It turns out the Python setup done by Github Actions does not use the latest version of pylint; the version used in Python 3.11 does not even run (fails with a known issue already fixed in current versions).
I added code to always update pylint. With this change, new warnings popped up across different versions of Python. This PR also fixes those.
Once we use the latest pylint, it also turns out there is no need to keep different rcfiles for different Python versions, the differences were mostly due to the different versions of pylint we were using. This PR uses only 1 rcfiles and the few differences are handled with command-line options in .github/workflows/ci_pr.yml (I added comments in the file explaining the differences).
Also, I removed the rcfile for Python 2.7. We do not have pylint for the venv used for 2.7 and we are not linting the code on that version.
Lastly, I suppressed deprecated-module for the crypt module referenced in azurelinuxagent/common/utils/textutil.py. That will be addressed on a separate PR.