Browse Source
Fix typehints for __class_getitem__ in Transform and Range
pull/9594/head
owocado
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
discord/app_commands/transformers.py
|
|
@ -525,7 +525,7 @@ else: |
|
|
|
.. versionadded:: 2.0 |
|
|
|
""" |
|
|
|
|
|
|
|
def __class_getitem__(cls, items) -> _TransformMetadata: |
|
|
|
def __class_getitem__(cls, items) -> Transformer: |
|
|
|
if not isinstance(items, tuple): |
|
|
|
raise TypeError(f'expected tuple for arguments, received {items.__class__.__name__} instead') |
|
|
|
|
|
|
@ -570,7 +570,7 @@ else: |
|
|
|
await interaction.response.send_message(f'Your value is {value}', ephemeral=True) |
|
|
|
""" |
|
|
|
|
|
|
|
def __class_getitem__(cls, obj) -> _TransformMetadata: |
|
|
|
def __class_getitem__(cls, obj) -> RangeTransformer: |
|
|
|
if not isinstance(obj, tuple): |
|
|
|
raise TypeError(f'expected tuple for arguments, received {obj.__class__.__name__} instead') |
|
|
|
|
|
|
|