-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixesRelated to suggested fixes for violationsRelated to suggested fixes for violations
Description
Summary
How to reproduce:
$ mkdir foo
$ echo '
import foo.bar.module
import foo.baz.module
__all__ = []
' > foo/__init__.py
$ cargo run --bin ruff -- check test_f401_dup/foo/__init__.py --select F401 --preview --fix foo/__init__.pyfoo/__init__.py looks like this after the fix is applied:
import foo.bar.module
import foo.baz.module
__all__ = [
"foo",
...,
"foo",
"foo",
"foo",
"foo",
]It appears that foo.baz.module is never marked as used, and ruff keeps adding foo in __all__.
Version
Context
Ran into this bug when I upgraded ruff to 0.14.10 in mlflow/mlflow
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixesRelated to suggested fixes for violationsRelated to suggested fixes for violations