mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-22 19:34:23 +00:00
[ty] Move search path resolution to Options::to_program_settings
(#18937)
This commit is contained in:
parent
8b22992988
commit
5d546c600a
28 changed files with 481 additions and 549 deletions
|
@ -183,15 +183,16 @@ pub(crate) mod tests {
|
|||
Program::from_settings(
|
||||
&db,
|
||||
ProgramSettings {
|
||||
python_version: Some(PythonVersionWithSource {
|
||||
python_version: PythonVersionWithSource {
|
||||
version: self.python_version,
|
||||
source: PythonVersionSource::default(),
|
||||
}),
|
||||
},
|
||||
python_platform: self.python_platform,
|
||||
search_paths: SearchPathSettings::new(vec![src_root]),
|
||||
search_paths: SearchPathSettings::new(vec![src_root])
|
||||
.to_search_paths(db.system(), db.vendored())
|
||||
.context("Invalid search path settings")?,
|
||||
},
|
||||
)
|
||||
.context("Failed to configure Program settings")?;
|
||||
);
|
||||
|
||||
Ok(db)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue