gh-157763: Soft-deprecate ctypes.util.test - #157776
ZeroIntensity wants to merge 2 commits into
Conversation
|
@hugovk Any idea what's wrong with the lint job? The code that Ruff is complaining about is unrelated to this PR. |
BHUVANSH855
left a comment
There was a problem hiding this comment.
I think dllist is still intentionally reexported as ctypes.util.dllist, removing test() only removed its last in-module reference, so ruff now reports F401.
|
Hm, okay. Why is Ruff linting ctypes at all? I thought the lint jobs were supposed to be limited to a specific list of modules, because the stdlib is chock full of weird things that linters don't like. |
You've deleted code that used the import, so delete the import as well. |
We only lint for unused imports (F401) in the stdlib: Before this, we've had lots of PRs to remove unused imports: https://github.com/python/cpython/pulls?q=is%3Apr+state%3Aclosed+%22remove+unused+imports%22 It's often an easy little performance improvement, keeps the code tidier, and lint lets us avoid them in the first place. |
Uh oh!
There was an error while loading. Please reload this page.