Allow NewType.__supertype__ to also be a NewType (#11728)

This commit is contained in:
bzoracler
2024-04-07 22:15:51 +12:00
committed by GitHub
parent eee28ad90f
commit bc4b26fbcb
2 changed files with 2 additions and 2 deletions

View File

@@ -374,7 +374,7 @@ else:
class NewType:
def __init__(self, name: str, tp: Any) -> None: ...
def __call__(self, obj: _T, /) -> _T: ...
__supertype__: type
__supertype__: type | NewType
if sys.version_info >= (3, 10):
def __or__(self, other: Any) -> _SpecialForm: ...
def __ror__(self, other: Any) -> _SpecialForm: ...