-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[pylint] Exempt required imports from PLR0402
#20381
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
Conversation
|
|
Hmmm... I'm a bit conflicted here about whether Would it be possible to have What do you think? |
dylwil3
left a comment
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! One nit
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_future_import.rs
Outdated
Show resolved
Hide resolved
isort] Fix infinite loop when checking equivalent imports (I002, PLR0402)pylint] Exempt required imports from PLR0402
Summary
Fixes #20380
The fix changes the
includes_importfunction inI002to recognize equivalent imports based on bound name and qualified name rather than exact syntax matching.This allows the function to correctly identify that
from concurrent import futuressatisfies the requirement forimport concurrent.futures as futures.