mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-19 03:48:29 +00:00
This PR carries over some of the `has_relation_to` logic for comparing a typevar with itself. A typevar will specialize to the same type if it's mentioned multiple times, so it is always assignable to and a subtype of itself. (Note that typevars can only specialize to fully static types.) This is also true when the typevar appears in a union on the right-hand side, or in an intersection on the left-hand side. Similarly, a typevar is always disjoint from its negation, so when a negated typevar appears on the left-hand side, the constraint set is never satisfiable. (Eventually this will allow us to remove the corresponding clauses from `has_relation_to`, but that can't happen until more of #20093 lands.) |
||
|---|---|---|
| .. | ||
| src | ||
| ty_extensions | ||
| vendor/typeshed | ||
| .gitignore | ||
| build.rs | ||
| Cargo.toml | ||
| README.md | ||
Vendored types for the stdlib
This crate vendors typeshed's stubs for the standard library. The vendored stubs can be found in crates/ty_vendored/vendor/typeshed. The file crates/ty_vendored/vendor/typeshed/source_commit.txt tells you the typeshed commit that our vendored stdlib stubs currently correspond to.
The typeshed stubs are updated every two weeks via an automated PR using the sync_typeshed.yaml workflow in the .github/workflows directory. This workflow can also be triggered at any time via workflow dispatch.