Make the repr for KeyAction more compact
This commit is contained in:
parent
5470dd74bd
commit
f976851442
1 changed files with 5 additions and 0 deletions
|
|
@ -50,6 +50,11 @@ class KeyAction(NamedTuple):
|
|||
func: str
|
||||
args: Sequence[str] = ()
|
||||
|
||||
def __repr__(self) -> str:
|
||||
if self.args:
|
||||
return f'KeyAction({self.func!r}, {self.args!r})'
|
||||
return f'KeyAction({self.func!r})'
|
||||
|
||||
|
||||
class InvalidMods(ValueError):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in a new issue