[pylint] Exempt required imports from PLR0402#20381
Conversation
|
|
Hmmm... I'm a bit conflicted here about whether Would it be possible to have What do you think? |
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.