astral-sh
ruff
BlogDocsChangelog

Performance History

Latest Results

Try using a sub-call to evaluate paramspec
dhruv/paramspec-args-kwargs
18 minutes ago
[ty] Add code action support to playground
micha/code-actions-playground
35 minutes ago
[ty] Use `zip` to perform explicit specialization (#21635) ## Summary This PR updates the explicit specialization logic to avoid using the call machinery. Previously, the logic would use the call machinery by converting the list of type variables into a `Binding` with a single `Signature` where all the type variables are positional-only parameters with bounds and constraints as the annotated type and the default type as the default parameter value. This has the advantage that it doesn't need to implement any specific logic but the disadvantages are subpar diagnostic messages as it would use the ones specific to a function call. But, an important disadvantage is that the kind of type variable is lost in this translation which becomes important in #21445 where a `ParamSpec` can specialize into a list of types which is provided using list literal. For example, ```py class Foo[T, **P]: ... Foo[int, [int, str]] ``` This PR converts the logic to use a simple loop using `zip_longest` as all type variables and their corresponding type argument maps on a 1-1 basis. They cannot be specified using keyword argument either e.g., `dict[_VT=str, _KT=int]` is invalid. This PR also makes an initial attempt to improve the diagnostic message to specifically target the specialization part by using words like "type argument" instead of just "argument" and including information like the type variable, bounds, and constraints. Further improvements can be made by highlighting the type variable definition or the bounds / constraints as a sub-diagnostic but I'm going to leave that as a follow-up. ## Test Plan Update messages in existing test cases.
main
5 hours ago
Update docs and schema
dhruv/zip-explicit-specialization
5 hours ago
Fix docs example
dhruv/zip-explicit-specialization
6 hours ago
wip: uniformly weak imports
gankra/full-weak
7 hours ago

Active Branches

[ty] Add support for `P.args` and `P.kwargs`
last run
18 minutes ago
#21445
CodSpeed Performance Gauge
0%
#21655
CodSpeed Performance Gauge
0%
© 2025 CodSpeed Technology
Home Terms Privacy Docs