[ty] Implement stdlib stub mapping (#19529)
by using essentially the same logic for system site-packages, on the assumption that system site-packages are always a subdir of the stdlib we were looking for.
This commit is contained in:
@@ -178,6 +178,12 @@ pub struct SearchPathSettings {
|
||||
|
||||
/// List of site packages paths to use.
|
||||
pub site_packages_paths: Vec<SystemPathBuf>,
|
||||
|
||||
/// Option path to the real stdlib on the system, and not some instance of typeshed.
|
||||
///
|
||||
/// We should ideally only ever use this for things like goto-definition,
|
||||
/// where typeshed isn't the right answer.
|
||||
pub real_stdlib_path: Option<SystemPathBuf>,
|
||||
}
|
||||
|
||||
impl SearchPathSettings {
|
||||
@@ -194,6 +200,7 @@ impl SearchPathSettings {
|
||||
extra_paths: vec![],
|
||||
custom_typeshed: None,
|
||||
site_packages_paths: vec![],
|
||||
real_stdlib_path: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user