-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
questionAsking for support or clarificationAsking for support or clarification
Description
Summary
Repro:
init.py
from a import foo
def baz() -> None:
pass
a.py
def foo():
pass
ruff check --fix --unsafe-fixes --select ALL
The unused import is not removed. Now, I assume this is special cased because __init__.py is special. It would be nice if there a way to bypass the special case anyway though. For now, though, I think I'll get my code out of __init__.py...
As a stopgap, it would be nice if it said something about why the import was not fixed here, this was very difficult to Google for why it was not fixing it since everyone claimed unused imports would be removed by this.
Version
ruff 0.9.10
Metadata
Metadata
Assignees
Labels
questionAsking for support or clarificationAsking for support or clarification