Config argument specificied in `ruff.lint.args` is ignored by the formatter
luctowers opened this issue · comments
Lucas Towers commented
settings.json
{
"ruff.lint.args": ["--config=/path/to/.ruff.toml"]
}
/path/to/.ruff.toml
line-length = 80
indent-width = 4
[format]
quote-style = "double"
indent-style = "tab"
Operating System: Debian (Devcontainer running on Docker for Mac)
Python Version: 3.12
Ruff Version: 0.2.1
Extension Version: v2024.10.0
When I format my python code with the above setup it does not obey the config file.
Setups that do work for me:
- Placing the
.ruff.toml
in the root of my project - Manually formatting with
ruff format --config=/path/to/.ruff.toml
Charlie Marsh commented
Ah sorry, you need to specify the config file for the format
command:
{
"ruff.format.args": ["--config=/path/to/.ruff.toml"]
}
Lucas Towers commented
I see, awesome thanks :)