Browse Source

Fix typehints for __class_getitem__ in Transform and Range

pull/9594/head
owocado 2 years ago
committed by GitHub
parent
commit
cf79af2dc4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      discord/app_commands/transformers.py

4
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')

Loading…
Cancel
Save