mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-22 19:34:23 +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
|
@ -17,7 +17,10 @@ pub(crate) mod tests {
|
|||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use crate::program::{Program, SearchPathSettings};
|
||||
use crate::{ProgramSettings, PythonPlatform, default_lint_registry};
|
||||
use crate::{
|
||||
ProgramSettings, PythonPlatform, PythonVersionSource, PythonVersionWithSource,
|
||||
default_lint_registry,
|
||||
};
|
||||
|
||||
use super::Db;
|
||||
use crate::lint::{LintRegistry, RuleSelection};
|
||||
|
@ -179,7 +182,10 @@ pub(crate) mod tests {
|
|||
Program::from_settings(
|
||||
&db,
|
||||
ProgramSettings {
|
||||
python_version: self.python_version,
|
||||
python_version: PythonVersionWithSource {
|
||||
version: self.python_version,
|
||||
source: PythonVersionSource::default(),
|
||||
},
|
||||
python_platform: self.python_platform,
|
||||
search_paths: SearchPathSettings::new(vec![src_root]),
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue