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
Currently, when enabled, the plugin will run format and check --fix on save, I want format to run, but not check --fix, or maybe I want check --fix but definitely not 'remove unused imports' (the absolute worst thing imaginable!)
If you are fine with disabling autofixing imports all together, then adding the following to your pyproject.toml will do:
[tool.ruff.lint]
select = ['I'] # warn about unsorted importsunfixable = ['I'] # but never fix them
The problem with that solution is that it also prevents you from manually triggering the sort via the context actions inside the IDE (c.f., #249 for a proposal that would fix this).
Unfortunately, I do want unused imports to be removed, and I find it extremely valuable. But removing them on save is a nightmare, so your solution isn't relevant to me.
Unfortunately, I do want unused imports to be removed, and I find it extremely valuable. But removing them on save is a nightmare, so your solution isn't relevant to me.
Isn't that precisely the caveat mentioned at the end of my comment and what #249 seeks to fix?
Currently, when enabled, the plugin will run
format
andcheck --fix
on save, I wantformat
to run, but notcheck --fix
, or maybe I wantcheck --fix
but definitely not 'remove unused imports' (the absolute worst thing imaginable!)Desired
config options for:
format
on savecheck --fix
on saveAdditional
The text was updated successfully, but these errors were encountered: