mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-14 20:40:28 +00:00
[ty] Infer the Python version from the environment if feasible (#18057)
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
This commit is contained in:
parent
9bbf4987e8
commit
88866f0048
19 changed files with 582 additions and 165 deletions
|
@ -237,10 +237,10 @@ impl TestCaseBuilder<MockedTypeshed> {
|
|||
Program::from_settings(
|
||||
&db,
|
||||
ProgramSettings {
|
||||
python_version: PythonVersionWithSource {
|
||||
python_version: Some(PythonVersionWithSource {
|
||||
version: python_version,
|
||||
source: PythonVersionSource::default(),
|
||||
},
|
||||
}),
|
||||
python_platform,
|
||||
search_paths: SearchPathSettings {
|
||||
extra_paths: vec![],
|
||||
|
@ -298,10 +298,10 @@ impl TestCaseBuilder<VendoredTypeshed> {
|
|||
Program::from_settings(
|
||||
&db,
|
||||
ProgramSettings {
|
||||
python_version: PythonVersionWithSource {
|
||||
python_version: Some(PythonVersionWithSource {
|
||||
version: python_version,
|
||||
source: PythonVersionSource::default(),
|
||||
},
|
||||
}),
|
||||
python_platform,
|
||||
search_paths: SearchPathSettings {
|
||||
python_path: PythonPath::KnownSitePackages(vec![site_packages.clone()]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue