How to force single quotes by passing an argument? #9743
-
I'm a newbie who's been a black formatter enjoyer (using the VS Code extension) that discovered Ruff just today. However, I prefer single quotes over double quotes. Is there a way I can force single quotes over double quotes without creating a .toml file? Going through the documentation and information I could find about switching from double quotes to single quotes, the right way to do it according to the docs is as follows: for pyproject.toml[tool.ruff.format]
quote-style = "single" for ruff.toml[format]
quote-style = "single" When using the black formatter, I was able to achieve the same without making a toml file by passing My VS Code's settings.json had this line. "python.formatting.blackArgs": ["--single-quotes"], Is there any way I can force single quote without creating a toml file when using Ruff? In my mind I had these two possibilities for args: Maybe like this "ruff.format.args": ["--single-quotes"] Or like this "ruff.format.args": ["--quote-style", "single"] Note I didn't put this in a feature request because I'm not entirely sure if I've overlooked something or if such a feature doesn't actually exist. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Thanks for the thorough issue! This actually doesn't exist yet, but it's about to exist: #9599. We're adding a mechanism to provide any setting / configuration option via the CLI. |
Beta Was this translation helpful? Give feedback.
Thanks for the thorough issue! This actually doesn't exist yet, but it's about to exist: #9599. We're adding a mechanism to provide any setting / configuration option via the CLI.