From 9971c2e09a0ed989c2c6a8c16a8eaf77f9270897 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Thu, 8 Sep 2022 02:06:36 -0400 Subject: [PATCH] [commands] Add __repr__ to Range --- discord/ext/commands/converter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index fff3d12ac..0d25d3ca8 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -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')