How to use ParamSpec
#1763
-
I'm trying to use
A prior issue said that to make this work at runtime, one can "stub" the
So how do I use/stub |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
PEP 612 support (including support for Here are a couple of alternative suggestions:
from __future__ import annotations
from typing import TYPE_CHECKING, Generic, TypeVar, Callable, Any
if TYPE_CHECKING:
from typing_extensions import ParamSpec
Input = ParamSpec("Input")
else:
Input = TypeVar("Input")
Output = TypeVar("Output") |
Beta Was this translation helpful? Give feedback.
PEP 612 support (including support for
ParamSpec
andConcatenate
) have been added to thetyping_extensions
library, but a new version oftyping_extensions
has not yet been published to pypi. See this issue for details.Here are a couple of alternative suggestions:
typing_extensions
library is published and upgrade to it. Feel free to file a request in that repo to ask the maintainers to publish sooner rather than later. :)