Skip to content

Commit 280488a

Browse files
committed
add explanatory comment
1 parent 1638dd5 commit 280488a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎crates/ruff_workspace/src/configuration.rs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,16 @@ impl Configuration {
637637
Some(fallback.into())
638638
});
639639
}
640+
// If the origin is UserSettings, we need more information
641+
// to determine where to search for a fallback target version.
642+
// - If Ruff is being invoked via the CLI, then we search in
643+
// the cwd.
644+
// - If Ruff is being invoked via the server, then we search
645+
// in the editor's workspace root.
646+
//
647+
// This logic is implemented manually, at the time of this
648+
// writing 2026-01-30, in `ruff::resolve::resolve` and
649+
// `ruff_server::session::index::ruff_settings::RuffSettings::fallback`, respectively.
640650
self
641651
}
642652
}

0 commit comments

Comments
 (0)