mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:42:02 +00:00
[red-knot] Support custom typeshed Markdown tests (#15683)
## Summary - Add feature to specify a custom typeshed from within Markdown-based tests - Port "builtins" unit tests from `infer.rs` to Markdown tests, part of #13696 ## Test Plan - Tests for the custom typeshed feature - New Markdown tests for deleted Rust unit tests
This commit is contained in:
parent
84301a7300
commit
7855f03735
13 changed files with 275 additions and 150 deletions
|
@ -108,7 +108,7 @@ pub struct SearchPathSettings {
|
|||
/// Optional path to a "custom typeshed" directory on disk for us to use for standard-library types.
|
||||
/// If this is not provided, we will fallback to our vendored typeshed stubs for the stdlib,
|
||||
/// bundled as a zip file in the binary
|
||||
pub typeshed: Option<SystemPathBuf>,
|
||||
pub custom_typeshed: Option<SystemPathBuf>,
|
||||
|
||||
/// The path to the user's `site-packages` directory, where third-party packages from ``PyPI`` are installed.
|
||||
pub site_packages: SitePackages,
|
||||
|
@ -119,7 +119,7 @@ impl SearchPathSettings {
|
|||
Self {
|
||||
src_roots,
|
||||
extra_paths: vec![],
|
||||
typeshed: None,
|
||||
custom_typeshed: None,
|
||||
site_packages: SitePackages::Known(vec![]),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue