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

Branches performance

Pull requests

[ty] Apply narrowing to walrus values#23687
last run
5 hours ago
[ty] Apply narrowing to walrus values
6 hours ago
7adb235
charlie/value-narrow
CodSpeed Performance Gauge
0%
[ty] Fix overload public type when implementation has a type-changing decorator When a decorated `@overload` implementation produces a non-`FunctionLiteral` type (a signature-preserving `Callable[P, T]` decorator or an untyped one), the binding type for the function name loses the overload chain. `FunctionLiteral` is what chains back to the `@overload` stubs via `previous_overload`. Without it, callers see the decorator's return type instead of the overload signatures. In `infer_definition_types`, after applying decorators, if the result is a non-`FunctionLiteral` and the function is the non-`@overload` implementation of an overload chain, restore the pre-decoration `FunctionLiteral`. Per PEP 484, the implementation should be ignored by type checkers; only the `@overload` stubs govern dispatch. The pre-decoration `FunctionLiteral` already chains back to the stubs, so restoring it gives the correct public type. Adds mdtests for an untyped decorator and a typed `Callable[P, T]` decorator. Both now reveal the overload stubs as the public type, matching mypy and pyright.
9 hours ago
dfc3765
titanous:fix/overload-decorated-impl
CodSpeed Performance Gauge
0%
[`pydocstyle`] Fix numpy section ordering (`D420`) Matches numpydoc section ordering Fixes #23682
9 hours ago
fa3308c
amy/numpy-docstring-sections
CodSpeed Performance Gauge
0%
[ty] Resolve type-context names from assignment RHS inference
2 days ago
61518af
Hugo-Polloli:assignment-type-context-core
CodSpeed Performance Gauge
-6%
© 2026 CodSpeed Technology
Home Terms Privacy Docs