mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-29 04:08:46 +00:00
Reformat Python files using black, isort and flake8.
This commit is contained in:
parent
bddb72d76a
commit
e3ab0dfbcb
@ -11,7 +11,9 @@ class PinCancelled(Exception):
|
||||
|
||||
|
||||
@ui.layout
|
||||
async def request_pin(label=None, attempts_remaining=None, cancellable: bool = True) -> str:
|
||||
async def request_pin(
|
||||
label=None, attempts_remaining=None, cancellable: bool = True
|
||||
) -> str:
|
||||
def onchange():
|
||||
c = dialog.cancel
|
||||
if matrix.pin:
|
||||
|
@ -32,6 +32,7 @@ _AUTOLOCK_DELAY_MS = const(0x0C) # int
|
||||
_NO_BACKUP = const(0x0D) # bool (0x01 or empty)
|
||||
# fmt: on
|
||||
|
||||
|
||||
def _set_bool(app: int, key: int, value: bool, public: bool = False) -> None:
|
||||
if value:
|
||||
config.set(app, key, _TRUE_BYTE, public)
|
||||
|
@ -1,8 +1,8 @@
|
||||
from trezor import config, log, loop, res, ui
|
||||
from trezor.pin import pin_to_int, show_pin_timeout
|
||||
|
||||
from apps.common.request_pin import request_pin
|
||||
from apps.common import storage
|
||||
from apps.common.request_pin import request_pin
|
||||
|
||||
|
||||
async def bootscreen():
|
||||
|
@ -64,7 +64,9 @@ class PinMatrix(ui.Widget):
|
||||
elif self.sublabel:
|
||||
# input line with header label and sublabel
|
||||
display.text_center(ui.WIDTH // 2, 20, self.label, ui.BOLD, ui.GREY, ui.BG)
|
||||
display.text_center(ui.WIDTH // 2, 46, self.sublabel, ui.NORMAL, ui.GREY, ui.BG)
|
||||
display.text_center(
|
||||
ui.WIDTH // 2, 46, self.sublabel, ui.NORMAL, ui.GREY, ui.BG
|
||||
)
|
||||
else:
|
||||
# input line with header label
|
||||
display.text_center(ui.WIDTH // 2, 36, self.label, ui.BOLD, ui.GREY, ui.BG)
|
||||
|
Loading…
Reference in New Issue
Block a user