Avatar for the astral-sh user
astral-sh
ruff
BlogDocsChangelog

Performance History

Latest Results

[ty] Support `typing.TypeForm` (#25334) ## Summary `TypeForm[T]` describes a value that is a valid type expression representing a type assignable to `T`. Unlike `type[T]`, it can describe forms such as parameterized generics and unions, not only runtime class objects: ```python from typing import assert_type from typing_extensions import TypeForm def construct[T](form: TypeForm[T]) -> T: raise NotImplementedError assert_type(construct(int), int) assert_type(construct(list[int]), list[int]) assert_type(construct(int | str), int | str) ``` This PR adds support for `TypeForm[T]`, bringing us into alignment with the conformance suite. For bare `type`, we treat it as a runtime class value, but one that doesn't promise a specific represented type, so it's valid for broad TypeForm destinations, but not narrow ones: ```python def use_bare_runtime_class(runtime_type: type) -> None: any_form: TypeForm[Any] = runtime_type object_form: TypeForm[object] = runtime_type string_form: TypeForm[str] = runtime_type # error ``` Closes https://github.com/astral-sh/ty/issues/2668.
main
33 minutes ago
Pass target directly to TypeForm inference
charlie/type-form
44 minutes ago
Codex review fixes
charlie/codex-metaclass-init-class-attributes
1 hour ago
Move into separate file
charlie/type-form
1 hour ago
Codex review fixes
charlie/codex-metaclass-init-class-attributes
2 hours ago
Re-add unpack hack
charlie/type-form
2 hours ago
Add literal
charlie/generic-disjoint
2 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
[ty] Support `typing.TypeForm`#25334
53 minutes ago
778be4c
charlie/type-form
CodSpeed Performance Gauge
0%
2 hours ago
69ac292
charlie/codex-metaclass-init-class-attributes
CodSpeed Performance Gauge
-7%
[ty] Detect disjointness due to incompatible generic specializations#24822
6 hours ago
9a2ce88
charlie/generic-disjoint
© 2026 CodSpeed Technology
Home Terms Privacy Docs