mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 14:52:01 +00:00
![]() ## Summary This fixes the infinite loop reported in #12897, where an `unused-import` that is undefined at the scope of `__all__` is "fixed" by adding it to `__all__` repeatedly. These changes make it so that only imports in the global scope will be suggested to add to `__all__` and the unused local import is simply removed. ## Test Plan Added a CLI integration test that sets up the same module structure as the original report Closes #12897 --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> |
||
---|---|---|
.. | ||
__init__.py | ||
other.py |