Summary
I have a bunch of projects that do not follow the PEP8 formatting rules (longer lines and non-standard indentation). For these I have made custom ruff.toml file that is referred to in the respective pyproject.toml files like this:
[tool.ruff]
extend = "~/projects/notpep8/ruff.toml"
The file structure is like this:
~/projects --- notpep8 -+- ruff.toml
|
+- proj -+- pyproject.toml
| |
| +- src --- example.py
This works perfectly when running ruff check from the command line in the respective project directories.
However when running ruff in VS Code using that Astral ruff extension, this seems to be ignored and instead the global PEP8 compliant ruff.toml file is used. This of course produces loads of errors.
I have tried several different things:
- Made an intentional error in pyproject.toml. This is detected so ruff does look at the file.
- Added
"ruff.configuration": "~/projects/notpep8/ruff.toml" lines to the various settings.json files. That does not change anything.
As far as I can see from the attached log file ruff does seem to load the local ruff.toml file - and then it loads the global one immediately afterwards.
ruff.log
Version
ruff 0.16.6 (22f65a2 2026-09-03)
Summary
I have a bunch of projects that do not follow the PEP8 formatting rules (longer lines and non-standard indentation). For these I have made custom
ruff.tomlfile that is referred to in the respectivepyproject.tomlfiles like this:The file structure is like this:
This works perfectly when running
ruff checkfrom the command line in the respective project directories.However when running ruff in VS Code using that Astral ruff extension, this seems to be ignored and instead the global PEP8 compliant
ruff.tomlfile is used. This of course produces loads of errors.I have tried several different things:
"ruff.configuration": "~/projects/notpep8/ruff.toml"lines to the varioussettings.jsonfiles. That does not change anything.As far as I can see from the attached log file ruff does seem to load the local
ruff.tomlfile - and then it loads the global one immediately afterwards.ruff.log
Version
ruff 0.16.6 (22f65a2 2026-09-03)