update format to fstring
This commit is contained in:
@@ -90,7 +90,7 @@ class LED(Extension):
|
||||
)
|
||||
|
||||
def __repr__(self):
|
||||
return 'LED({})'.format(self._to_dict())
|
||||
return f'LED({self._to_dict()})'
|
||||
|
||||
def _to_dict(self):
|
||||
return {
|
||||
|
@@ -22,7 +22,7 @@ class LockStatus(Extension):
|
||||
self.hid = device
|
||||
|
||||
def __repr__(self):
|
||||
return ('LockStatus(report={})').format(self.report)
|
||||
return f'LockStatus(report={self.report})'
|
||||
|
||||
def during_bootup(self, sandbox):
|
||||
return
|
||||
|
@@ -36,7 +36,7 @@ class Rgb_matrix_data:
|
||||
):
|
||||
keys = [key_color] * number_of_keys
|
||||
underglow = [underglow_color] * number_of_underglow
|
||||
print('Rgb_matrix_data(keys={},\nunderglow={})'.format(keys, underglow))
|
||||
print(f'Rgb_matrix_data(keys={keys},\nunderglow={underglow})')
|
||||
|
||||
|
||||
class Rgb_matrix(Extension):
|
||||
|
@@ -57,7 +57,7 @@ class statusLED(Extension):
|
||||
self._layer_last = layer_active
|
||||
|
||||
def __repr__(self):
|
||||
return 'SLED({})'.format(self._to_dict())
|
||||
return f'SLED({self._to_dict()})'
|
||||
|
||||
def _to_dict(self):
|
||||
return {
|
||||
|
Reference in New Issue
Block a user