mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:18 +00:00
[ty] Tell the user why we inferred the Python version we inferred (#18082)
This commit is contained in:
parent
cb9e66927e
commit
d37592175f
20 changed files with 303 additions and 124 deletions
|
@ -19,7 +19,8 @@ use std::backtrace::BacktraceStatus;
|
|||
use std::fmt::Write;
|
||||
use ty_python_semantic::types::check_types;
|
||||
use ty_python_semantic::{
|
||||
Program, ProgramSettings, PythonPath, PythonPlatform, SearchPathSettings, SysPrefixPathOrigin,
|
||||
Program, ProgramSettings, PythonPath, PythonPlatform, PythonVersionSource,
|
||||
PythonVersionWithSource, SearchPathSettings, SysPrefixPathOrigin,
|
||||
};
|
||||
|
||||
mod assertion;
|
||||
|
@ -260,7 +261,10 @@ fn run_test(
|
|||
let configuration = test.configuration();
|
||||
|
||||
let settings = ProgramSettings {
|
||||
python_version,
|
||||
python_version: PythonVersionWithSource {
|
||||
version: python_version,
|
||||
source: PythonVersionSource::Cli,
|
||||
},
|
||||
python_platform: configuration
|
||||
.python_platform()
|
||||
.unwrap_or(PythonPlatform::Identifier("linux".to_string())),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue