Consider the following file repro.py:
from datetime import date, time # noqa: F401
And 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 = true
Running ruff repro.py results in the time import being deleted:
from datetime import date # noqa: F401
Running ruff repro.py --unfixable=F401 results in:
from datetime import date # noqa: F401
from datetime import time
So 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: F401
This is on the latest version of ruff (0.0.254).
Consider the following file
repro.py:And let's say my ruff config has
isortlints, with force-single-line option:Running
ruff repro.pyresults in thetimeimport being deleted:Running
ruff repro.py --unfixable=F401results in:So the problem here is that the
# noqacomment is not reproduced on the extra lines. Desired outcome would be:This is on the latest version of ruff (
0.0.254).