mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
[typing] Add NewType.__name__ attribute (#15092)
This commit is contained in:
@@ -387,6 +387,7 @@ if sys.version_info >= (3, 10):
|
||||
def __or__(self, other: Any) -> _SpecialForm: ...
|
||||
def __ror__(self, other: Any) -> _SpecialForm: ...
|
||||
__supertype__: type | NewType
|
||||
__name__: str
|
||||
|
||||
else:
|
||||
def NewType(name: str, tp: Any) -> Any: ...
|
||||
|
||||
@@ -376,6 +376,7 @@ else:
|
||||
def __init__(self, name: str, tp: AnnotationForm) -> None: ...
|
||||
def __call__(self, obj: _T, /) -> _T: ...
|
||||
__supertype__: type | NewType
|
||||
__name__: str
|
||||
if sys.version_info >= (3, 10):
|
||||
def __or__(self, other: Any) -> _SpecialForm: ...
|
||||
def __ror__(self, other: Any) -> _SpecialForm: ...
|
||||
|
||||
Reference in New Issue
Block a user