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. |
TheRealFalcon
left a comment
There was a problem hiding this comment.
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. |
Proposed Commit Message
Additional Context
Spotted by our
cloud-init-style-tipJenkins 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: