1
0
mirror of https://github.com/Rapptz/discord.py.git synced 2025-05-11 08:19:54 +00:00

[commands] Add __repr__ to Range

This commit is contained in:
Rapptz 2022-09-08 02:06:36 -04:00
parent 75fd49e6a1
commit 9971c2e09a

@ -1112,6 +1112,9 @@ else:
def __or__(self, rhs) -> Any:
return Union[self, rhs]
def __repr__(self) -> str:
return f'{self.__class__.__name__}[{self.annotation.__name__}, {self.min}, {self.max}]'
def __class_getitem__(cls, obj) -> Range:
if not isinstance(obj, tuple):
raise TypeError(f'expected tuple for arguments, received {obj.__class__!r} instead')