When coding, it is annoying that our temporary imports and variables that we haven't yet used are removed every time we save the file.
We'd like the Ruff extension to auto-fix on save in general (and we have that activated using editor.codeActionsOnSave), but not F401 (unused imports) and F841 (unused variables).
We do want the rule to autofix in other contexts (pre-commit hook, CI). Is there a way to do that?
When coding, it is annoying that our temporary imports and variables that we haven't yet used are removed every time we save the file.
We'd like the Ruff extension to auto-fix on save in general (and we have that activated using
editor.codeActionsOnSave), but not F401 (unused imports) and F841 (unused variables).We do want the rule to autofix in other contexts (pre-commit hook, CI). Is there a way to do that?