From 68e4a84785c8eff66668996f299e4b91706b3c12 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 3 May 2022 07:32:26 -0600 Subject: [PATCH 1/2] Add `GenericAlias.__unpacked__` python/cpython#92059 --- stdlib/types.pyi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdlib/types.pyi b/stdlib/types.pyi index 872ed57a7c76..a62cf9490fca 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -651,6 +651,9 @@ if sys.version_info >= (3, 9): @property def __parameters__(self) -> tuple[Any, ...]: ... def __init__(self, origin: type, args: Any) -> None: ... + if sys.version_info >= (3, 11): + @property + def __unpacked__(self) -> bool: ... def __getattr__(self, name: str) -> Any: ... # incomplete if sys.version_info >= (3, 10): From f7a722fb9cf5ff0473849023c5fa0a0b53ead2fe Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 May 2022 13:35:44 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/types.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/types.pyi b/stdlib/types.pyi index a62cf9490fca..ed2476e44a86 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -654,6 +654,7 @@ if sys.version_info >= (3, 9): if sys.version_info >= (3, 11): @property def __unpacked__(self) -> bool: ... + def __getattr__(self, name: str) -> Any: ... # incomplete if sys.version_info >= (3, 10):