mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +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
|
@ -1,8 +1,8 @@
|
|||
use anyhow::{Context, anyhow};
|
||||
use ruff_db::Upcast;
|
||||
use ruff_db::files::{File, Files, system_path_to_file};
|
||||
use ruff_db::system::{DbWithTestSystem, System, SystemPath, SystemPathBuf, TestSystem};
|
||||
use ruff_db::vendored::VendoredFileSystem;
|
||||
use ruff_db::{Db, Upcast};
|
||||
use ruff_python_ast::PythonVersion;
|
||||
|
||||
use ty_python_semantic::lint::{LintRegistry, RuleSelection};
|
||||
|
@ -205,15 +205,16 @@ impl CorpusDb {
|
|||
Program::from_settings(
|
||||
&db,
|
||||
ProgramSettings {
|
||||
python_version: Some(PythonVersionWithSource {
|
||||
python_version: PythonVersionWithSource {
|
||||
version: PythonVersion::latest_ty(),
|
||||
source: PythonVersionSource::default(),
|
||||
}),
|
||||
},
|
||||
python_platform: PythonPlatform::default(),
|
||||
search_paths: SearchPathSettings::new(vec![]),
|
||||
search_paths: SearchPathSettings::new(vec![])
|
||||
.to_search_paths(db.system(), db.vendored())
|
||||
.unwrap(),
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
);
|
||||
|
||||
db
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue