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

Run pylint on Python 3.11 #3067

Merged
merged 4 commits into from
Feb 26, 2024
Merged

Run pylint on Python 3.11 #3067

merged 4 commits into from
Feb 26, 2024

Conversation

narrieta
Copy link
Member

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.

@narrieta narrieta merged commit dfd912e into Azure:develop Feb 26, 2024
13 checks passed
@narrieta narrieta deleted the py311 branch February 26, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants