-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugSomething isn't workingSomething isn't workingisortRelated to import sortingRelated to import sorting
Description
Consider the following file repro.py:
from datetime import date, time # noqa: F401And let's say my ruff config has isort lints, with force-single-line option:
[tool.ruff]
fix = true
select = ["F", "I"]
[tool.ruff.isort]
force-single-line = trueRunning ruff repro.py results in the time import being deleted:
from datetime import date # noqa: F401Running ruff repro.py --unfixable=F401 results in:
from datetime import date # noqa: F401
from datetime import timeSo the problem here is that the # noqa comment is not reproduced on the extra lines. Desired outcome would be:
from datetime import date # noqa: F401
from datetime import time # noqa: F401This is on the latest version of ruff (0.0.254).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingisortRelated to import sortingRelated to import sorting