Add stubs for types.get_original_bases (#10073)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
James Hilton-Balfe
2023-04-23 22:13:43 +01:00
committed by GitHub
parent cedf3b5684
commit acfde4e40b

View File

@@ -56,6 +56,9 @@ if sys.version_info >= (3, 9):
if sys.version_info >= (3, 10):
__all__ += ["EllipsisType", "NoneType", "NotImplementedType", "UnionType"]
if sys.version_info >= (3, 12):
__all__ += ["get_original_bases"]
# Note, all classes "defined" here require special handling.
_T1 = TypeVar("_T1")
@@ -563,6 +566,9 @@ def prepare_class(
name: str, bases: tuple[type, ...] = (), kwds: dict[str, Any] | None = None
) -> tuple[type, dict[str, Any], dict[str, Any]]: ...
if sys.version_info >= (3, 12):
def get_original_bases(__cls: type) -> tuple[Any, ...]: ...
# Actually a different type, but `property` is special and we want that too.
DynamicClassAttribute = property