Browse Source

[commands] Add __repr__ to Range

pull/10109/head
Rapptz 3 years ago
committed by dolfies
parent
commit
49b33e2f89
  1. 3
      discord/ext/commands/converter.py

3
discord/ext/commands/converter.py

@ -1103,6 +1103,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')

Loading…
Cancel
Save