Skip to content

Commit acfde4e

Browse files
Gobot1234JelleZijlstraAlexWaygood
authored
Add stubs for types.get_original_bases (#10073)
Co-authored-by: Jelle Zijlstra <[email protected]> Co-authored-by: Alex Waygood <[email protected]>
1 parent cedf3b5 commit acfde4e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stdlib/types.pyi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ if sys.version_info >= (3, 9):
5656
if sys.version_info >= (3, 10):
5757
__all__ += ["EllipsisType", "NoneType", "NotImplementedType", "UnionType"]
5858

59+
if sys.version_info >= (3, 12):
60+
__all__ += ["get_original_bases"]
61+
5962
# Note, all classes "defined" here require special handling.
6063

6164
_T1 = TypeVar("_T1")
@@ -563,6 +566,9 @@ def prepare_class(
563566
name: str, bases: tuple[type, ...] = (), kwds: dict[str, Any] | None = None
564567
) -> tuple[type, dict[str, Any], dict[str, Any]]: ...
565568

569+
if sys.version_info >= (3, 12):
570+
def get_original_bases(__cls: type) -> tuple[Any, ...]: ...
571+
566572
# Actually a different type, but `property` is special and we want that too.
567573
DynamicClassAttribute = property
568574

0 commit comments

Comments
 (0)