1
0
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:
andrew 2019-01-11 20:57:12 +01:00 committed by Pavol Rusnak
parent bddb72d76a
commit e3ab0dfbcb
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
4 changed files with 22 additions and 17 deletions

View File

@ -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:

View File

@ -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)

View File

@ -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():

View File

@ -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)