-
Notifications
You must be signed in to change notification settings - Fork 910
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
Update pylint and fix the new issues its spots #946
Conversation
This is marked as a WIP because it doesn't fix this yet:
as I'm not really sure on what to do. The Other projects are facing this, e.g. pypa/setuptools#479 |
CI failure is of course expected for now:
|
I see nothing about the code using this lock that actually requires it. There's not multiple threads in play and we're not creating import hooks. I'm comfortable removing the locking code altogether. |
Thanks! I agree it doesn't really seem needed. I'll update the branch and drop those. |
Specimen: cloudinit/distros/rhel.py:81: [W0237(arguments-renamed), Distro._write_hostname] Parameter 'filename' has been renamed to 'out_fn' in overridden 'Distro._write_hostname' method cloudinit/distros/rhel.py:133: [W0237(arguments-renamed), Distro.package_command] Parameter 'cmd' has been renamed to 'command' in overridden 'Distro.package_command' method cloudinit/distros/gentoo.py:152: [W0237(arguments-renamed), Distro._write_hostname] Parameter 'hostname' has been renamed to 'your_hostname' in overridden 'Distro._write_hostname' method
The imp module is deprecated and replaced by importlib, which according to the documentation has no replacement for acquire_lock() and release_lock(), which are the only reason why `imp` is imported. I see nothing about the code using this lock that actually requires it. Let's remove the locking code and the import altogether.
Branch updated and proposed commit message updated. I removed the WIP as this is now ready for review. |
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.
Some minor requests inline
`out_fn` may cause confusion as `fn` may be interpreted as "function".
Also: remove the `noqa` annotation (qa passes).
PR updated and proposed commit message also updated. |
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.
Thanks!
Proposed Commit Message
Additional Context
Spotted by our
cloud-init-style-tip
Jenkins job.This is the job always running against the latest versions of the linters. The job allows to keep the code up-to-date with the new versions without breaking CI, which uses pinned versions instead.
Test Steps
Checklist: