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
I'm using the vscode extension and whenever I try to run Ruff: Format imports on my python file I get this error, which I found in the log output:
Using environment executable: /usr/local/Caskroom/miniconda/base/bin/ruff
Inferred version ruff 0.0.135 for: /usr/local/Caskroom/miniconda/base/bin/ruff
Running Ruff with: ['/usr/local/Caskroom/miniconda/base/bin/ruff', '--force-exclude', '--no-cache', '--no-fix', '--quiet', '--format', 'json', '-', '--fix', '--extend-ignore', 'ALL', '--extend-select', 'I001', '--stdin-filename', '/Users/amytroschinetz/source/spellbot/src/spellbot/services/games.py']
error: Found argument '--force-exclude' which wasn't expected, or isn't valid in this context
If you tried to supply '--force-exclude' as a value rather than a flag, use '-- --force-exclude'
Usage: ruff [OPTIONS] <FILES>...
For more information try '--help'
vscode indicates that the version installed is v2023.12.0.
I think ruff is using the wrong path. In vscode the python environment that I have selected is ./env. But the extension seems to be using my miniconda environment for some reason.
Here you can see I've selected the local virtualenv, so it should be using the ruff from here:
The text was updated successfully, but these errors were encountered:
Originally posted in the Ruff repo via astral-sh/ruff#4017:
The text was updated successfully, but these errors were encountered: