[ty] Tell the user why we inferred the Python version we inferred (#18082)

This commit is contained in:
Alex Waygood 2025-05-21 11:06:27 -04:00 committed by GitHub
parent cb9e66927e
commit d37592175f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 303 additions and 124 deletions

View file

@ -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]),
},