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

This commit is contained in:
bzoracler authored and GitHub committed 2024-04-07 06:15:51 -04:00
1 parent eee28ad90f
commit bc4b26fbcb
2 files changed
+2 -2

No files matched your search

+1 -1
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: ...