You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PEP 646 explicitly allows Callable[[T, *Ts, S], int], but mypy currently prohibits it with an error like "Positional arg cannot follow var arg". I think we should support this.
The text was updated successfully, but these errors were encountered:
Fixes#15412
Two new things here as specified by PEP 646:
* Using star for an (explicit) type unpaking in callables, like
`Callable[[str, *tuple[int, ...]], None]`
* Allowing suffix items after a variadic item, like `Callable[[X,
Unpack[Ys], Z], bool]`
Implementation is straightforward. Btw while working in this I
accidentally fixed a nasty bug, tuple types were often not given any
line/column numbers, so if such type becomes a location of an error, it
is impossible to ignore.
PEP 646 explicitly allows
Callable[[T, *Ts, S], int]
, but mypy currently prohibits it with an error like "Positional arg cannot follow var arg". I think we should support this.The text was updated successfully, but these errors were encountered: