update format to fstring

This commit is contained in:
crazyiop
2022-06-11 23:54:01 +02:00
committed by xs5871
parent 6068b60cac
commit ffcfc9835d
9 changed files with 30 additions and 44 deletions

View File

@@ -433,7 +433,7 @@ class Key:
)
def __repr__(self):
return 'Key(code={}, has_modifiers={})'.format(self.code, self.has_modifiers)
return f'Key(code={self.code}, has_modifiers={self.has_modifiers})'
def on_press(self, state, coord_int=None, coord_raw=None):
if hasattr(self, '_pre_press_handlers'):
@@ -616,9 +616,7 @@ class ModifierKey(Key):
)
def __repr__(self):
return 'ModifierKey(code={}, has_modifiers={})'.format(
self.code, self.has_modifiers
)
return f'ModifierKey(code={self.code}, has_modifiers={self.has_modifiers})'
class ConsumerKey(Key):