You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I add required imports to a python file where the very first line is # isort: off ruff will raise an error and add the required import multiple times. This does not happen if the # isort: off directive is not the first line
error: Failed to converge after 100 iterations.
This indicates a bug in`ruff`. If you could open an issue at:
https://github.com/charliermarsh/ruff/issues/new?title=%5BInfinite%20loop%5D
...quoting the contents of `unsorted.py`, the rule codes I002, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!unsorted.py:1:1: I002 Missing required import: `from __future__ import annotations`Found 101 errors (100 fixed, 1 remaining).
Summary
If I add required imports to a python file where the very first line is
# isort: off
ruff will raise an error and add the required import multiple times. This does not happen if the# isort: off
directive is not the first lineRuff Version:
0.0.269
Ruff Config:
Ruff Command:
isort: off
directive on first linePython File:
unsorted.py
Ruff Output
Modified Python File
Other comment as first line
Python File:
unsorted.py
Ruff Output
Modified Python File
Ideally I would have an extra line between the
future
import and the# isort: off
comment.Blank first line
Python File:
unsorted.py
Ruff Output
Modified Python File
The text was updated successfully, but these errors were encountered: