Skip to content

Rule F401 causes autofix error #6758

@qarmin

Description

@qarmin

Ruff 0.0.285

ruff  *.py --select ALL --no-cache

file content:

if typing.TYPE_CHECKING:
    import logging

    from tenacity import RetryCallStat

error:

error: Autofix introduced a syntax error. Reverting all changes.

This indicates a bug in `ruff`. If you could open an issue at:

    https://github.com/astral-sh/ruff/issues/new?title=%5BAutofix%20error%5D

...quoting the contents of `PY_FILE_TEST_7845308560.py`, the rule codes F401, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!

PY_FILE_TEST_7845308560.py.zip

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfuzzerSurfaced via fuzzing.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions