New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read user configuration from ~/.config/ruff/ruff.toml
on macOS
#11115
base: main
Are you sure you want to change the base?
Conversation
a663349
to
72b3e76
Compare
72b3e76
to
a1f871d
Compare
@@ -34,6 +34,7 @@ crossbeam = { version = "0.8.4" } | |||
dirs = { version = "5.0.0" } | |||
drop_bomb = { version = "0.1.5" } | |||
env_logger = { version = "0.11.0" } | |||
etcetera = { version = "0.8.0" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@konstin suggested this crate, and it does what we want across Windows and Linux / macOS, but open to other suggestions.
@@ -34,6 +34,7 @@ crossbeam = { version = "0.8.4" } | |||
dirs = { version = "5.0.0" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove dirs
in a future release, but it stays around for now for backwards compatibility.
|
Sooo, we're doing twitter driven development now 😂 |
I would change the reasoning/description: Follow the XDG specification on all Unix platforms. Ruff will now use the XDG config directory to read user-level configuration (default: |
Summary
This PR moves Ruff's user-specific configuration from
~/Library/Application Support/ruff/ruff.toml
to~/.config/ruff/ruff.toml
.Many other tools do this. On my machine alone: dagger, zed, gatsby, gh, wandb, etc.
I also polled Twitter and it won in a landslide:
Let's ship this in v0.5.0, along with a deprecation warning (so we'll continue to respect
~/Library/Application Support/ruff/ruff.toml
, but log a warning).Closes #10739.
Test Plan
cargo check foo.py
.~/.config/ruff/ruff.toml
.