mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-16 03:28:09 +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
|
@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():
|
def onchange():
|
||||||
c = dialog.cancel
|
c = dialog.cancel
|
||||||
if matrix.pin:
|
if matrix.pin:
|
||||||
|
@ -32,6 +32,7 @@ _AUTOLOCK_DELAY_MS = const(0x0C) # int
|
|||||||
_NO_BACKUP = const(0x0D) # bool (0x01 or empty)
|
_NO_BACKUP = const(0x0D) # bool (0x01 or empty)
|
||||||
# fmt: on
|
# fmt: on
|
||||||
|
|
||||||
|
|
||||||
def _set_bool(app: int, key: int, value: bool, public: bool = False) -> None:
|
def _set_bool(app: int, key: int, value: bool, public: bool = False) -> None:
|
||||||
if value:
|
if value:
|
||||||
config.set(app, key, _TRUE_BYTE, public)
|
config.set(app, key, _TRUE_BYTE, public)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
from trezor import config, log, loop, res, ui
|
from trezor import config, log, loop, res, ui
|
||||||
from trezor.pin import pin_to_int, show_pin_timeout
|
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 import storage
|
||||||
|
from apps.common.request_pin import request_pin
|
||||||
|
|
||||||
|
|
||||||
async def bootscreen():
|
async def bootscreen():
|
||||||
|
@ -64,7 +64,9 @@ class PinMatrix(ui.Widget):
|
|||||||
elif self.sublabel:
|
elif self.sublabel:
|
||||||
# input line with header label and 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, 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:
|
else:
|
||||||
# input line with header label
|
# input line with header label
|
||||||
display.text_center(ui.WIDTH // 2, 36, self.label, ui.BOLD, ui.GREY, ui.BG)
|
display.text_center(ui.WIDTH // 2, 36, self.label, ui.BOLD, ui.GREY, ui.BG)
|
||||||
|
Loading…
Reference in New Issue
Block a user