ruff/crates/ty_vendored
Douglas Creager e42cdf8495
[ty] Carry generic context through when converting class into `Callable` (#21798)
When converting a class (whether specialized or not) into a `Callable`
type, we should carry through any generic context that the constructor
has. This includes both the generic context of the class itself (if it's
generic) and of the constructor methods (if they are separately
generic).

To help test this, this also updates the `generic_context` extension
function to work on `Callable` types and unions; and adds a new
`into_callable` extension function that works just like
`CallableTypeOf`, but on value forms instead of type forms.

Pulled this out of #21551 for separate review.
2025-12-05 08:57:21 -05:00
..
src [ty] Disallow std::env and io methods in most ty crates (#20046) 2025-08-22 11:13:47 -07:00
ty_extensions [ty] Carry generic context through when converting class into `Callable` (#21798) 2025-12-05 08:57:21 -05:00
vendor/typeshed [ty] Sync vendored typeshed stubs (#21715) 2025-12-03 15:49:51 +00:00
.gitignore Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
Cargo.toml [ty] Support LSP go-to with vendored typeshed stubs (#19057) 2025-07-02 07:58:58 -04:00
README.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
build.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00

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.