-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
useless-import-alias
(PLC0414) conflicts with missing-required-import
(I002) in Ruff 0.7.3 if the latter rule is configured to require an alias that the former rule considers useless.
$ echo 1 | ruff check --isolated --select I002,PLC0414 --config 'lint.isort.required-imports = ["import numpy as numpy"]' - --unsafe-fixes --fix
error: Failed to converge after 100 iterations.
This indicates a bug in Ruff. If you could open an issue at:
https://github.com/astral-sh/ruff/issues/new?title=%5BInfinite%20loop%5D
...quoting the contents of `-`, the rule codes I002, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
import numpy
1
-:1:1: I002 Missing required import: `import numpy as numpy`
Found 101 errors (100 fixed, 1 remaining).
[*] 1 fixable with the --fix option.
dylwil3
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working