Skip to content

[red-knot] Do not ignore typeshed stubs for 'venv' module#16596

Merged
sharkdp merged 1 commit intomainfrom
david/typeshed-venv-stubs
Mar 10, 2025
Merged

[red-knot] Do not ignore typeshed stubs for 'venv' module#16596
sharkdp merged 1 commit intomainfrom
david/typeshed-venv-stubs

Conversation

@sharkdp
Copy link
Contributor

@sharkdp sharkdp commented Mar 10, 2025

Summary

We currently fail to add the stubs for the venv stdlib module because there is a venv/ ignore pattern in the top-level .gitignore file.

Another solution would be to remove the top-level .gitignore pattern. I'm personally not a big fan of such tool-specific ignore patterns, and I am even less of a fan of broad patterns like "venv", "dist", "build", "downloads", "lib" or "parts". I have seen them cause annoying-to-debug problems way too often. But I wasn't sure if anyone relied on these.

Test Plan

Ran the typeshed sync workflow manually once to see if the venv/ folder is now correctly added.

@sharkdp sharkdp added the ty Multi-file analysis & type inference label Mar 10, 2025
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! Reminds me of python/typeshed#8607 😃

@sharkdp sharkdp merged commit ca97470 into main Mar 10, 2025
21 checks passed
@sharkdp sharkdp deleted the david/typeshed-venv-stubs branch March 10, 2025 08:07
dcreager added a commit that referenced this pull request Mar 10, 2025
* main:
  [red-knot] Add support for calling `type[…]` (#16597)
  Update migration guide with the new `ruff.configuration` (#16567)
  [red-knot] Add 'mypy_primer' workflow (#16554)
  Update Rust crate indoc to v2.0.6 (#16585)
  Update Rust crate syn to v2.0.100 (#16590)
  Update Rust crate thiserror to v2.0.12 (#16591)
  Update Rust crate serde_json to v1.0.140 (#16589)
  Update Rust crate quote to v1.0.39 (#16587)
  Update Rust crate serde to v1.0.219 (#16588)
  Update Rust crate proc-macro2 to v1.0.94 (#16586)
  Update Rust crate anyhow to v1.0.97 (#16584)
  Update dependency ruff to v0.9.10 (#16593)
  Update Rust crate unicode-ident to v1.0.18 (#16592)
  [red-knot] Do not ignore typeshed stubs for 'venv' module (#16596)
  [red-knot] Reduce Salsa lookups in `Type::find_name_in_mro` (#16582)
  Fix broken red-knot property tests (#16574)
  [red-knot] Consistent spelling of "metaclass" and "meta-type" (#16576)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants