File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -315,14 +315,15 @@ But::
315
315
def create_it(cls: _T) -> _T: ... # cls has type _T
316
316
317
317
PEP 612 [#pep612 ]_ parameter specification variables (``ParamSpec ``)
318
- are supported in argument and return types, although
319
- they need to be marked with ``# type: ignore `` to work with all
320
- type checkers [#ts-4827 ]_::
318
+ are supported in argument and return types::
321
319
322
320
_P = ParamSpec("_P")
323
- _T = TypeVar("_T")
321
+ _R = TypeVar("_R")
322
+
323
+ def foo(cb: Callable[_P, _R], *args: _P.args, **kwargs: _P.kwargs) -> _R: ...
324
324
325
- def foo(cb: Callable[_P, _T]) -> Callable[_P, _T]: ... # type: ignore
325
+ However, ``Concatenate `` from PEP 612 is not yet supported; nor is using
326
+ a ``ParamSpec `` to parameterize a generic class.
326
327
327
328
PEP 647 [#pep647 ]_ type guards are supported.
328
329
@@ -1102,7 +1103,6 @@ Bugs
1102
1103
1103
1104
.. [#ts-4819 ] typeshed issue #4819 -- PEP 604 tracker (https://github.com/python/typeshed/issues/4819)
1104
1105
.. [#ts-4820 ] typeshed issue #4820 -- PEP 585 tracker (https://github.com/python/typeshed/issues/4820)
1105
- .. [#ts-4827 ] typeshed issue #4827 -- PEP 612 tracker (https://github.com/python/typeshed/issues/4827)
1106
1106
.. [#ts-4913 ] typeshed issue #4913 -- PEP 613 tracker (https://github.com/python/typeshed/issues/4913)
1107
1107
.. [#ts-4972 ] typeshed issue #4972 -- PEP 570 tracker (https://github.com/python/typeshed/issues/4972)
1108
1108
You can’t perform that action at this time.
0 commit comments