Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[red-knot] Use POSIX representations of paths when creating the typeshed zip file #11982

Merged
merged 2 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Get rid of the dev dependency
  • Loading branch information
AlexWaygood committed Jun 22, 2024
commit 4fc0d75ed448f0d95555fac8345d6f052411ba15
1 change: 0 additions & 1 deletion crates/red_knot_module_resolver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ zip = { workspace = true }
[dev-dependencies]
anyhow = { workspace = true }
insta = { workspace = true }
path-slash = { workspace = true }
tempfile = { workspace = true }

[lints]
Expand Down
6 changes: 1 addition & 5 deletions crates/red_knot_module_resolver/src/typeshed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ pub(crate) mod versions;
#[cfg(test)]
mod tests {
use std::io::{self, Read};
use std::path::Path;

use path_slash::PathExt;

#[test]
fn typeshed_zip_created_at_build_time() -> anyhow::Result<()> {
Expand All @@ -16,9 +13,8 @@ mod tests {

let mut typeshed_zip_archive = zip::ZipArchive::new(io::Cursor::new(TYPESHED_ZIP_BYTES))?;

let path_to_functools = Path::new("stdlib").join("functools.pyi");
let mut functools_module_stub = typeshed_zip_archive
.by_name(&path_to_functools.to_slash().unwrap())
.by_name("stdlib/functools.pyi")
.unwrap();
assert!(functools_module_stub.is_file());

Expand Down
Loading