chore(core): export PropertyType to fix mypy errors

pull/1679/head
matejcik 3 years ago committed by matejcik
parent 319a4374d3
commit 015c47d564

@ -37,6 +37,8 @@ if False:
CardanoAssetGroupType,
)
from trezor.ui.layouts import PropertyType
ADDRESS_TYPE_NAMES = {
CardanoAddressType.BYRON: "Legacy",
@ -217,7 +219,7 @@ async def confirm_transaction(
validity_interval_start: int | None,
is_network_id_verifiable: bool,
) -> None:
props = [
props: list[PropertyType] = [
("Transaction amount:", format_coin_amount(amount)),
("Transaction fee:", format_coin_amount(fee)),
]
@ -467,7 +469,7 @@ async def show_warning_address_foreign_staking_key(
staking_account_path: list[int],
staking_key_hash: bytes | None,
) -> None:
props: list[tuple[str, str | None]] = [
props: list[PropertyType] = [
(
"Stake rights associated with this address do not match your account %s:"
% format_account_number(account_path),

@ -3,9 +3,11 @@ from trezor.enums import ButtonRequestType
from trezor.messages import ButtonAck, ButtonRequest
if False:
from typing import Any, Awaitable
from typing import Any, Awaitable, Optional, Tuple, Type, Union
LayoutType = Awaitable[Any]
PropertyType = Tuple[Optional[str], Union[str, bytes, None]]
ExceptionType = Union[BaseException, Type[BaseException]]
if __debug__:

@ -1,5 +1,4 @@
from micropython import const
from ubinascii import hexlify
from trezor import ui, wire
@ -14,11 +13,11 @@ from ..components.common.confirm import is_confirmed, raise_if_cancelled
from ..components.tt.button import ButtonCancel, ButtonDefault
from ..components.tt.confirm import Confirm, HoldToConfirm
from ..components.tt.scroll import (
PAGEBREAK,
PAGINATED_LINE_WIDTH,
Paginated,
paginate_paragraphs,
paginate_text,
PAGINATED_LINE_WIDTH,
PAGEBREAK,
)
from ..components.tt.text import Span, Text
from ..constants.tt import (
@ -36,15 +35,11 @@ if False:
Awaitable,
Iterator,
NoReturn,
Optional,
Sequence,
Tuple,
Type,
Union,
)
ExceptionType = Union[BaseException, Type[BaseException]]
PropertyType = Tuple[Optional[str], Union[str, bytes, None]]
from .common import PropertyType, ExceptionType
__all__ = (

Loading…
Cancel
Save