mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
Make the repr for KeyAction more compact
This commit is contained in:
@@ -50,6 +50,11 @@ class KeyAction(NamedTuple):
|
|||||||
func: str
|
func: str
|
||||||
args: Sequence[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):
|
class InvalidMods(ValueError):
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user