We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ParamSpec
This issue has been migrated from #11711.
PEP-612 adds ParamSpec, which will allow us to correctly annotate:
cast
*args
**kwargs
mypy 0.931 (blocked on #11712)
As of mypy 0.931, basic ParamSpec usage is supported, plus P.args and P.kwargs. These styles of function can be annotated:
P.args
P.kwargs
def decorate(f: Callable[P, R]) -> Callable[P, Optional[R]]: def wrapped(*args: P.args, **kwargs: P.kwargs) -> Optional[R]: ...
def call(f: Callable[P, R], *args: P.args, **kwargs: P.kwargs) -> R: ...
Concatenate and def call(f: Callable[P, R], *args: P.args, some_flag: bool = False, **kwargs: P.kwargs) (extra kwarg) don't work yet.
Concatenate
def call(f: Callable[P, R], *args: P.args, some_flag: bool = False, **kwargs: P.kwargs)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This issue has been migrated from #11711.
PEP-612 adds
ParamSpec
, which will allow us to correctly annotate:cast
s.*args
and**kwargs
.mypy 0.931
(blocked on #11712)
As of mypy 0.931, basic
ParamSpec
usage is supported, plusP.args
andP.kwargs
. These styles of function can be annotated:Concatenate
anddef call(f: Callable[P, R], *args: P.args, some_flag: bool = False, **kwargs: P.kwargs)
(extra kwarg) don't work yet.The text was updated successfully, but these errors were encountered: