diff --git a/.flake8 b/.flake8 index 2867dd2a2..1acaff280 100644 --- a/.flake8 +++ b/.flake8 @@ -9,4 +9,8 @@ ignore = # E402: module level import not at top of file E402, # E501: line too long - E501 + E501, + # F403: star import used, unable to detect undefined names + F403, + # F405: name may be undefined, or defined from star imports + F405 diff --git a/src/apps/common/request_pin.py b/src/apps/common/request_pin.py index 09bd9c08d..6616c257d 100644 --- a/src/apps/common/request_pin.py +++ b/src/apps/common/request_pin.py @@ -8,6 +8,7 @@ if __debug__: DEFAULT_CANCEL = res.load(ui.ICON_CLEAR) DEFAULT_LOCK = res.load(ui.ICON_LOCK) + @unimport async def request_pin_on_display(ctx: wire.Context, code: int=None) -> str: from trezor.messages.ButtonRequest import ButtonRequest diff --git a/src/trezor/ui/confirm.py b/src/trezor/ui/confirm.py index 4a903bffc..21b74f84a 100644 --- a/src/trezor/ui/confirm.py +++ b/src/trezor/ui/confirm.py @@ -10,6 +10,7 @@ CANCELLED = const(2) DEFAULT_CONFIRM = res.load(ui.ICON_CONFIRM) DEFAULT_CANCEL = res.load(ui.ICON_CLEAR) + class ConfirmDialog(Widget): def __init__(self, content, confirm=DEFAULT_CONFIRM, cancel=DEFAULT_CANCEL): diff --git a/src/trezor/ui/style.py b/src/trezor/ui/style.py index d6d895ab1..ea7a7feb0 100644 --- a/src/trezor/ui/style.py +++ b/src/trezor/ui/style.py @@ -13,8 +13,8 @@ BACKLIGHT_MAX = const(255) # color palette LIGHT_RED = rgb(0xFF, 0x00, 0x00) -RED = rgb(0xE4, 0x57, 0x2E) # RED E4572E -ACTIVE_RED = rgb(0xA6, 0x40, 0x22) # ACTIVE DARK RED A64022 +RED = rgb(0xE4, 0x57, 0x2E) # RED E4572E +ACTIVE_RED = rgb(0xA6, 0x40, 0x22) # ACTIVE DARK RED A64022 PINK = rgb(0xE9, 0x1E, 0x63) PURPLE = rgb(0x9C, 0x27, 0xB0) DEEP_PURPLE = rgb(0x67, 0x3A, 0xB7) @@ -23,8 +23,8 @@ BLUE = rgb(0x21, 0x96, 0xF3) LIGHT_BLUE = rgb(0x03, 0xA9, 0xF4) CYAN = rgb(0x00, 0xBC, 0xD4) TEAL = rgb(0x00, 0x96, 0x88) -GREEN = rgb(0x4C, 0xC1, 0x48) # GREEN 4CC148 -ACTIVE_GREEN = rgb(0x1A, 0x8C, 0x14) # ACTIVE DARK GREEN 1A8C14 +GREEN = rgb(0x4C, 0xC1, 0x48) # GREEN 4CC148 +ACTIVE_GREEN = rgb(0x1A, 0x8C, 0x14) # ACTIVE DARK GREEN 1A8C14 LIGHT_GREEN = rgb(0x87, 0xCE, 0x26) LIME = rgb(0xCD, 0xDC, 0x39) YELLOW = rgb(0xFF, 0xEB, 0x3B)