Closed ryanovas closed 2 months ago
Is it possible that you have the isort extension installed?
Separately, what does your project structure look like? Do you use a src
directory?
Looks like I did have the isort extension, disabling it fixed the problem. Good call, and such a fast response!
Thank you!
Oh nice! Okay, glad it was an easy fix. Happy to help.
easy fixes are the best kind of fixes
Hi, new user of ruff here.
Having a strange issue where the linter quick fix wants to solve I001 one way, and the formatter wants to format in another way. I have format & quick fix on save both enabled, and they both try to apply and it always flips between the 2, settling on the formatter and the linting error not going away.
I don't want to turn off the isort linting, I would prefer for them not to conflict in the first place. Here are my files:
pyproject.toml:
my file when the quick fix from the linter is applied:
my file when the formatter runs:
It also does this in another file:
with linter:
with formatter:
Interestingly, it only seems to do it with the vscode extention. If I run format manually it doesn't change the file from the linting version. It also doesn't do this in every file. Here are some examples that don't do this:
My versions are: ruff = "^0.3.6" extension version: v2024.16.0