mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-09 23:11:10 +00:00
refactor(core): use if TYPE_CHECKING instead of direct import and fix style of ignore statement
[no changelog]
This commit is contained in:
parent
7adae923d3
commit
cce2335965
@ -60,7 +60,7 @@ def exception(name: str, exc: BaseException) -> None:
|
|||||||
name,
|
name,
|
||||||
_DEBUG,
|
_DEBUG,
|
||||||
"ui.Result: %s",
|
"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":
|
elif exc.__class__.__name__ == "Cancelled":
|
||||||
_log(name, _DEBUG, "ui.Cancelled")
|
_log(name, _DEBUG, "ui.Cancelled")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from typing import Awaitable, Sequence
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
import trezorui2
|
import trezorui2
|
||||||
from trezor import TR
|
from trezor import TR
|
||||||
@ -9,6 +9,11 @@ from . import confirm_action, show_success, show_warning
|
|||||||
|
|
||||||
CONFIRMED = trezorui2.CONFIRMED # global_import_cache
|
CONFIRMED = trezorui2.CONFIRMED # global_import_cache
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from typing import Awaitable, Sequence
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
async def show_share_words(
|
async def show_share_words(
|
||||||
share_words: Sequence[str],
|
share_words: Sequence[str],
|
||||||
|
Loading…
Reference in New Issue
Block a user