ParamSpec only matches the first overload #10756
Replies: 1 comment 4 replies
|
When a Today's type checkers (including pyright and mypy) capture only the first overloaded signature, as you see above. This is the most straightforward approach, from an implementation standpoint, which is probably why it's the behavior that everyone landed on. If you'd like to see a different behavior standardized here, my recommendation is that you propose an update to the typing spec. There is a well-defined process for doing this, which you can find here. |
Uh oh!
There was an error while loading. Please reload this page.
Playground
I see 2 issues here:
myfnincorrectly reports an overlapping overload, interestingly the async function does not.task.executeandaio_task.executeonly allow the first overload value.All reactions