mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-07 17:39:03 +00:00
Fix typehints for __class_getitem__ in Transform and Range
This commit is contained in:
1 parent
c115cfb0ac
commit
cf79af2dc4
1 file changed
+2
-2
@@ -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')
|
||||
|
||||
|
||||
Reference in new issue
Block a user