|
@ -1096,6 +1096,13 @@ else: |
|
|
|
|
|
|
|
|
return converted |
|
|
return converted |
|
|
|
|
|
|
|
|
|
|
|
def __call__(self) -> None: |
|
|
|
|
|
# Trick to allow it inside typing.Union |
|
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
def __or__(self, rhs) -> Any: |
|
|
|
|
|
return Union[self, rhs] |
|
|
|
|
|
|
|
|
def __class_getitem__(cls, obj) -> Range: |
|
|
def __class_getitem__(cls, obj) -> Range: |
|
|
if not isinstance(obj, tuple): |
|
|
if not isinstance(obj, tuple): |
|
|
raise TypeError(f'expected tuple for arguments, received {obj.__class__!r} instead') |
|
|
raise TypeError(f'expected tuple for arguments, received {obj.__class__!r} instead') |
|
|