From 578af275109c5b84f595a87d209411b85b04bffb Mon Sep 17 00:00:00 2001 From: Stephen Morton Date: Wed, 15 Jan 2025 06:36:02 -0800 Subject: [PATCH] add `types.GenericAlias.__mro_entries__` (#13284) --- stdlib/@tests/stubtest_allowlists/common.txt | 1 - stdlib/types.pyi | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/@tests/stubtest_allowlists/common.txt b/stdlib/@tests/stubtest_allowlists/common.txt index 06cfeff9c..12d2cbc8b 100644 --- a/stdlib/@tests/stubtest_allowlists/common.txt +++ b/stdlib/@tests/stubtest_allowlists/common.txt @@ -459,7 +459,6 @@ turtle.ScrolledCanvas.select_item # Dynamically created, has unnecessary *args types.GenericAlias.__call__ # Would be complicated to fix properly, Any could silence problems. #6392 types.GenericAlias.__getattr__ -types.GenericAlias.__mro_entries__ typing.type_check_only # typing decorator that is not available at runtime diff --git a/stdlib/types.pyi b/stdlib/types.pyi index b294a0b2f..d41ca0d1c 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -640,6 +640,7 @@ if sys.version_info >= (3, 9): def __getitem__(self, typeargs: Any, /) -> GenericAlias: ... def __eq__(self, value: object, /) -> bool: ... def __hash__(self) -> int: ... + def __mro_entries__(self, bases: Iterable[object], /) -> tuple[type, ...]: ... if sys.version_info >= (3, 11): @property def __unpacked__(self) -> bool: ...