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
The code above (in particular, the signature for function f) isn't legal. A P.args annotation can be used only within a context where P is bound to a scope (a generic function or class), only with a *args parameter, and only when paired with a corresponding **kwargs: P.kwargs parameter. See PEP 612 for details.
Mypy should flag the illegal use of P.args as an error. (That makes this a false negative, not a false positive.)
Per the docs, "P.args ... should only be used to annotate *args":
Gist:
https://mypy-play.net/?mypy=latest&python=3.11&gist=28f03ed1b30e9707edfd080095b6a868
The text was updated successfully, but these errors were encountered: