Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions crates/ruff_workspace/src/pyproject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ pub fn find_fallback_target_version<P: AsRef<Path>>(path: P) -> Option<PythonVer
#[cfg(not(target_arch = "wasm32"))]
pub fn find_user_settings_toml() -> Option<PathBuf> {
use etcetera::BaseStrategy;
use ruff_linter::warn_user_once;

let strategy = etcetera::base_strategy::choose_base_strategy().ok()?;
let config_dir = strategy.config_dir().join("ruff");
Expand All @@ -127,23 +126,6 @@ pub fn find_user_settings_toml() -> Option<PathBuf> {
}
}

// On macOS, we used to support reading from `/Users/Alice/Library/Application Support`.
if cfg!(target_os = "macos") {
let strategy = etcetera::base_strategy::Apple::new().ok()?;
let deprecated_config_dir = strategy.data_dir().join("ruff");

for file in [".ruff.toml", "ruff.toml", "pyproject.toml"] {
let path = deprecated_config_dir.join(file);
if path.is_file() {
warn_user_once!(
"Reading configuration from `~/Library/Application Support` is deprecated. Please move your configuration to `{}/{file}`.",
config_dir.display(),
);
return Some(path);
}
}
}

None
}

Expand Down
Loading