From a0039201bdcd96c75e545a0115d16d30d532ff93 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Thu, 14 Nov 2024 16:47:14 +0100 Subject: [PATCH] refactor(core): update and unify type ignore statements [no changelog] --- core/src/trezor/log.py | 2 +- core/src/trezor/ui/layouts/tr/reset.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/trezor/log.py b/core/src/trezor/log.py index 4c3aa65d051..199ccd3efc6 100644 --- a/core/src/trezor/log.py +++ b/core/src/trezor/log.py @@ -60,7 +60,7 @@ def exception(name: str, exc: BaseException) -> None: name, _DEBUG, "ui.Result: %s", - exc.value, # type: ignore[Cannot access attribute "value" for class "BaseException"] + exc.value, # type: ignore [Cannot access attribute "value" for class "BaseException"] ) elif exc.__class__.__name__ == "Cancelled": _log(name, _DEBUG, "ui.Cancelled") diff --git a/core/src/trezor/ui/layouts/tr/reset.py b/core/src/trezor/ui/layouts/tr/reset.py index 0a5317c1ff5..326f703752c 100644 --- a/core/src/trezor/ui/layouts/tr/reset.py +++ b/core/src/trezor/ui/layouts/tr/reset.py @@ -1,4 +1,4 @@ -from typing import Awaitable, Sequence +from typing import TYPE_CHECKING import trezorui2 from trezor import TR @@ -9,6 +9,11 @@ CONFIRMED = trezorui2.CONFIRMED # global_import_cache +if TYPE_CHECKING: + from typing import Awaitable, Sequence + + pass + async def show_share_words( share_words: Sequence[str],