style(common): mypy: disable implicit Optional for function arguments

pull/1559/head
Martin Milata 3 years ago committed by matejcik
parent 8b3ac659a0
commit 0278998f72

@ -279,9 +279,12 @@ class Descriptor:
for field in required_fields: for field in required_fields:
yield f" {field.name}: {field.py_type}," yield f" {field.name}: {field.py_type},"
for field in repeated_fields: for field in repeated_fields:
yield f" {field.name}: List[{field.py_type}] = None," yield f" {field.name}: Optional[List[{field.py_type}]] = None,"
for field in optional_fields: for field in optional_fields:
yield f" {field.name}: {field.py_type} = {field.default_value}," if field.default_value is None:
yield f" {field.name}: Optional[{field.py_type}] = None,"
else:
yield f" {field.name}: {field.py_type} = {field.default_value},"
yield " ) -> None:" yield " ) -> None:"
for field in repeated_fields: for field in repeated_fields:
@ -356,7 +359,7 @@ class Descriptor:
yield "" yield ""
yield "if __debug__:" yield "if __debug__:"
yield " try:" yield " try:"
yield " from typing import Dict, List # noqa: F401" yield " from typing import Dict, List, Optional # noqa: F401"
yield " from typing_extensions import Literal # noqa: F401" yield " from typing_extensions import Literal # noqa: F401"
all_enums = [field for field in fields if field.type_name in self.enum_types] all_enums = [field for field in fields if field.type_name in self.enum_types]

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class ApplyFlags(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
flags: int = None, flags: Optional[int] = None,
) -> None: ) -> None:
self.flags = flags self.flags = flags

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
EnumTypeSafetyCheckLevel = Literal[0, 1, 2] EnumTypeSafetyCheckLevel = Literal[0, 1, 2]
except ImportError: except ImportError:
@ -17,15 +17,15 @@ class ApplySettings(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
language: str = None, language: Optional[str] = None,
label: str = None, label: Optional[str] = None,
use_passphrase: bool = None, use_passphrase: Optional[bool] = None,
homescreen: bytes = None, homescreen: Optional[bytes] = None,
auto_lock_delay_ms: int = None, auto_lock_delay_ms: Optional[int] = None,
display_rotation: int = None, display_rotation: Optional[int] = None,
passphrase_always_on_device: bool = None, passphrase_always_on_device: Optional[bool] = None,
safety_checks: EnumTypeSafetyCheckLevel = None, safety_checks: Optional[EnumTypeSafetyCheckLevel] = None,
experimental_features: bool = None, experimental_features: Optional[bool] = None,
) -> None: ) -> None:
self.language = language self.language = language
self.label = label self.label = label

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
EnumTypeInputScriptType = Literal[0, 1, 2, 3, 4] EnumTypeInputScriptType = Literal[0, 1, 2, 3, 4]
EnumTypeAmountUnit = Literal[0, 1, 2, 3] EnumTypeAmountUnit = Literal[0, 1, 2, 3]
@ -21,8 +21,8 @@ class AuthorizeCoinJoin(p.MessageType):
*, *,
coordinator: str, coordinator: str,
max_total_fee: int, max_total_fee: int,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
fee_per_anonymity: int = None, fee_per_anonymity: Optional[int] = None,
coin_name: str = "Bitcoin", coin_name: str = "Bitcoin",
script_type: EnumTypeInputScriptType = 0, script_type: EnumTypeInputScriptType = 0,
amount_unit: EnumTypeAmountUnit = 0, amount_unit: EnumTypeAmountUnit = 0,

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,9 +16,9 @@ class BinanceCancelMsg(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
refid: str = None, refid: Optional[str] = None,
sender: str = None, sender: Optional[str] = None,
symbol: str = None, symbol: Optional[str] = None,
) -> None: ) -> None:
self.refid = refid self.refid = refid
self.sender = sender self.sender = sender

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -15,8 +15,8 @@ class BinanceCoin(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
amount: int = None, amount: Optional[int] = None,
denom: str = None, denom: Optional[str] = None,
) -> None: ) -> None:
self.amount = amount self.amount = amount
self.denom = denom self.denom = denom

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,8 +16,8 @@ class BinanceGetAddress(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
show_display: bool = None, show_display: Optional[bool] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.show_display = show_display self.show_display = show_display

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,8 +16,8 @@ class BinanceGetPublicKey(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
show_display: bool = None, show_display: Optional[bool] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.show_display = show_display self.show_display = show_display

@ -6,7 +6,7 @@ from .BinanceCoin import BinanceCoin
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,8 +17,8 @@ class BinanceInputOutput(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
coins: List[BinanceCoin] = None, coins: Optional[List[BinanceCoin]] = None,
address: str = None, address: Optional[str] = None,
) -> None: ) -> None:
self.coins = coins if coins is not None else [] self.coins = coins if coins is not None else []
self.address = address self.address = address

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
EnumTypeBinanceOrderType = Literal[0, 1, 2, 3] EnumTypeBinanceOrderType = Literal[0, 1, 2, 3]
EnumTypeBinanceOrderSide = Literal[0, 1, 2] EnumTypeBinanceOrderSide = Literal[0, 1, 2]
@ -19,14 +19,14 @@ class BinanceOrderMsg(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
id: str = None, id: Optional[str] = None,
ordertype: EnumTypeBinanceOrderType = None, ordertype: Optional[EnumTypeBinanceOrderType] = None,
price: int = None, price: Optional[int] = None,
quantity: int = None, quantity: Optional[int] = None,
sender: str = None, sender: Optional[str] = None,
side: EnumTypeBinanceOrderSide = None, side: Optional[EnumTypeBinanceOrderSide] = None,
symbol: str = None, symbol: Optional[str] = None,
timeinforce: EnumTypeBinanceTimeInForce = None, timeinforce: Optional[EnumTypeBinanceTimeInForce] = None,
) -> None: ) -> None:
self.id = id self.id = id
self.ordertype = ordertype self.ordertype = ordertype

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,13 +16,13 @@ class BinanceSignTx(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
msg_count: int = None, msg_count: Optional[int] = None,
account_number: int = None, account_number: Optional[int] = None,
chain_id: str = None, chain_id: Optional[str] = None,
memo: str = None, memo: Optional[str] = None,
sequence: int = None, sequence: Optional[int] = None,
source: int = None, source: Optional[int] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.msg_count = msg_count self.msg_count = msg_count

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -6,7 +6,7 @@ from .BinanceInputOutput import BinanceInputOutput
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -18,8 +18,8 @@ class BinanceTransferMsg(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
inputs: List[BinanceInputOutput] = None, inputs: Optional[List[BinanceInputOutput]] = None,
outputs: List[BinanceInputOutput] = None, outputs: Optional[List[BinanceInputOutput]] = None,
) -> None: ) -> None:
self.inputs = inputs if inputs is not None else [] self.inputs = inputs if inputs is not None else []
self.outputs = outputs if outputs is not None else [] self.outputs = outputs if outputs is not None else []

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
EnumTypeButtonRequestType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] EnumTypeButtonRequestType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
except ImportError: except ImportError:
@ -17,7 +17,7 @@ class ButtonRequest(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
code: EnumTypeButtonRequestType = None, code: Optional[EnumTypeButtonRequestType] = None,
) -> None: ) -> None:
self.code = code self.code = code

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -6,7 +6,7 @@ from .CardanoBlockchainPointerType import CardanoBlockchainPointerType
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
EnumTypeCardanoAddressType = Literal[0, 1, 2, 3, 4, 5, 6, 7, 8, 14, 15] EnumTypeCardanoAddressType = Literal[0, 1, 2, 3, 4, 5, 6, 7, 8, 14, 15]
except ImportError: except ImportError:
@ -19,10 +19,10 @@ class CardanoAddressParametersType(p.MessageType):
self, self,
*, *,
address_type: EnumTypeCardanoAddressType, address_type: EnumTypeCardanoAddressType,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
address_n_staking: List[int] = None, address_n_staking: Optional[List[int]] = None,
staking_key_hash: bytes = None, staking_key_hash: Optional[bytes] = None,
certificate_pointer: CardanoBlockchainPointerType = None, certificate_pointer: Optional[CardanoBlockchainPointerType] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.address_n_staking = address_n_staking if address_n_staking is not None else [] self.address_n_staking = address_n_staking if address_n_staking is not None else []

@ -6,7 +6,7 @@ from .CardanoTokenType import CardanoTokenType
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -18,7 +18,7 @@ class CardanoAssetGroupType(p.MessageType):
self, self,
*, *,
policy_id: bytes, policy_id: bytes,
tokens: List[CardanoTokenType] = None, tokens: Optional[List[CardanoTokenType]] = None,
) -> None: ) -> None:
self.tokens = tokens if tokens is not None else [] self.tokens = tokens if tokens is not None else []
self.policy_id = policy_id self.policy_id = policy_id

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -6,7 +6,7 @@ from .CardanoAddressParametersType import CardanoAddressParametersType
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,8 +16,8 @@ class CardanoGetPublicKey(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
show_display: bool = None, show_display: Optional[bool] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.show_display = show_display self.show_display = show_display

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -15,8 +15,8 @@ class CardanoPoolOwnerType(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
staking_key_path: List[int] = None, staking_key_path: Optional[List[int]] = None,
staking_key_hash: bytes = None, staking_key_hash: Optional[bytes] = None,
) -> None: ) -> None:
self.staking_key_path = staking_key_path if staking_key_path is not None else [] self.staking_key_path = staking_key_path if staking_key_path is not None else []
self.staking_key_hash = staking_key_hash self.staking_key_hash = staking_key_hash

@ -8,7 +8,7 @@ from .CardanoPoolRelayParametersType import CardanoPoolRelayParametersType
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -26,9 +26,9 @@ class CardanoPoolParametersType(p.MessageType):
margin_numerator: int, margin_numerator: int,
margin_denominator: int, margin_denominator: int,
reward_account: str, reward_account: str,
owners: List[CardanoPoolOwnerType] = None, owners: Optional[List[CardanoPoolOwnerType]] = None,
relays: List[CardanoPoolRelayParametersType] = None, relays: Optional[List[CardanoPoolRelayParametersType]] = None,
metadata: CardanoPoolMetadataType = None, metadata: Optional[CardanoPoolMetadataType] = None,
) -> None: ) -> None:
self.owners = owners if owners is not None else [] self.owners = owners if owners is not None else []
self.relays = relays if relays is not None else [] self.relays = relays if relays is not None else []

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
EnumTypeCardanoPoolRelayType = Literal[0, 1, 2] EnumTypeCardanoPoolRelayType = Literal[0, 1, 2]
except ImportError: except ImportError:
@ -17,10 +17,10 @@ class CardanoPoolRelayParametersType(p.MessageType):
self, self,
*, *,
type: EnumTypeCardanoPoolRelayType, type: EnumTypeCardanoPoolRelayType,
ipv4_address: bytes = None, ipv4_address: Optional[bytes] = None,
ipv6_address: bytes = None, ipv6_address: Optional[bytes] = None,
host_name: str = None, host_name: Optional[str] = None,
port: int = None, port: Optional[int] = None,
) -> None: ) -> None:
self.type = type self.type = type
self.ipv4_address = ipv4_address self.ipv4_address = ipv4_address

@ -6,7 +6,7 @@ from .HDNodeType import HDNodeType
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -9,7 +9,7 @@ from .CardanoTxWithdrawalType import CardanoTxWithdrawalType
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -24,13 +24,13 @@ class CardanoSignTx(p.MessageType):
protocol_magic: int, protocol_magic: int,
fee: int, fee: int,
network_id: int, network_id: int,
inputs: List[CardanoTxInputType] = None, inputs: Optional[List[CardanoTxInputType]] = None,
outputs: List[CardanoTxOutputType] = None, outputs: Optional[List[CardanoTxOutputType]] = None,
certificates: List[CardanoTxCertificateType] = None, certificates: Optional[List[CardanoTxCertificateType]] = None,
withdrawals: List[CardanoTxWithdrawalType] = None, withdrawals: Optional[List[CardanoTxWithdrawalType]] = None,
ttl: int = None, ttl: Optional[int] = None,
metadata: bytes = None, metadata: Optional[bytes] = None,
validity_interval_start: int = None, validity_interval_start: Optional[int] = None,
) -> None: ) -> None:
self.inputs = inputs if inputs is not None else [] self.inputs = inputs if inputs is not None else []
self.outputs = outputs if outputs is not None else [] self.outputs = outputs if outputs is not None else []

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,7 +17,7 @@ class CardanoSignedTx(p.MessageType):
self, self,
*, *,
tx_hash: bytes, tx_hash: bytes,
serialized_tx: bytes = None, serialized_tx: Optional[bytes] = None,
) -> None: ) -> None:
self.tx_hash = tx_hash self.tx_hash = tx_hash
self.serialized_tx = serialized_tx self.serialized_tx = serialized_tx

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -6,7 +6,7 @@ from .CardanoPoolParametersType import CardanoPoolParametersType
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
EnumTypeCardanoCertificateType = Literal[0, 1, 2, 3] EnumTypeCardanoCertificateType = Literal[0, 1, 2, 3]
except ImportError: except ImportError:
@ -19,9 +19,9 @@ class CardanoTxCertificateType(p.MessageType):
self, self,
*, *,
type: EnumTypeCardanoCertificateType, type: EnumTypeCardanoCertificateType,
path: List[int] = None, path: Optional[List[int]] = None,
pool: bytes = None, pool: Optional[bytes] = None,
pool_parameters: CardanoPoolParametersType = None, pool_parameters: Optional[CardanoPoolParametersType] = None,
) -> None: ) -> None:
self.path = path if path is not None else [] self.path = path if path is not None else []
self.type = type self.type = type

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,7 +17,7 @@ class CardanoTxInputType(p.MessageType):
*, *,
prev_hash: bytes, prev_hash: bytes,
prev_index: int, prev_index: int,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.prev_hash = prev_hash self.prev_hash = prev_hash

@ -7,7 +7,7 @@ from .CardanoAssetGroupType import CardanoAssetGroupType
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -19,9 +19,9 @@ class CardanoTxOutputType(p.MessageType):
self, self,
*, *,
amount: int, amount: int,
token_bundle: List[CardanoAssetGroupType] = None, token_bundle: Optional[List[CardanoAssetGroupType]] = None,
address: str = None, address: Optional[str] = None,
address_parameters: CardanoAddressParametersType = None, address_parameters: Optional[CardanoAddressParametersType] = None,
) -> None: ) -> None:
self.token_bundle = token_bundle if token_bundle is not None else [] self.token_bundle = token_bundle if token_bundle is not None else []
self.amount = amount self.amount = amount

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class CardanoTxWithdrawalType(p.MessageType):
self, self,
*, *,
amount: int, amount: int,
path: List[int] = None, path: Optional[List[int]] = None,
) -> None: ) -> None:
self.path = path if path is not None else [] self.path = path if path is not None else []
self.amount = amount self.amount = amount

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class ChangePin(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
remove: bool = None, remove: Optional[bool] = None,
) -> None: ) -> None:
self.remove = remove self.remove = remove

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class ChangeWipeCode(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
remove: bool = None, remove: Optional[bool] = None,
) -> None: ) -> None:
self.remove = remove self.remove = remove

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -18,11 +18,11 @@ class CipherKeyValue(p.MessageType):
*, *,
key: str, key: str,
value: bytes, value: bytes,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
encrypt: bool = None, encrypt: Optional[bool] = None,
ask_on_encrypt: bool = None, ask_on_encrypt: Optional[bool] = None,
ask_on_decrypt: bool = None, ask_on_decrypt: Optional[bool] = None,
iv: bytes = None, iv: Optional[bytes] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.key = key self.key = key

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
EnumTypeDebugSwipeDirection = Literal[0, 1, 2, 3] EnumTypeDebugSwipeDirection = Literal[0, 1, 2, 3]
except ImportError: except ImportError:
@ -17,13 +17,13 @@ class DebugLinkDecision(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
yes_no: bool = None, yes_no: Optional[bool] = None,
swipe: EnumTypeDebugSwipeDirection = None, swipe: Optional[EnumTypeDebugSwipeDirection] = None,
input: str = None, input: Optional[str] = None,
x: int = None, x: Optional[int] = None,
y: int = None, y: Optional[int] = None,
wait: bool = None, wait: Optional[bool] = None,
hold_ms: int = None, hold_ms: Optional[int] = None,
) -> None: ) -> None:
self.yes_no = yes_no self.yes_no = yes_no
self.swipe = swipe self.swipe = swipe

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class DebugLinkEraseSdCard(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
format: bool = None, format: Optional[bool] = None,
) -> None: ) -> None:
self.format = format self.format = format

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,9 +16,9 @@ class DebugLinkGetState(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
wait_word_list: bool = None, wait_word_list: Optional[bool] = None,
wait_word_pos: bool = None, wait_word_pos: Optional[bool] = None,
wait_layout: bool = None, wait_layout: Optional[bool] = None,
) -> None: ) -> None:
self.wait_word_list = wait_word_list self.wait_word_list = wait_word_list
self.wait_word_pos = wait_word_pos self.wait_word_pos = wait_word_pos

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class DebugLinkLayout(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
lines: List[str] = None, lines: Optional[List[str]] = None,
) -> None: ) -> None:
self.lines = lines if lines is not None else [] self.lines = lines if lines is not None else []

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class DebugLinkRecordScreen(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
target_directory: str = None, target_directory: Optional[str] = None,
) -> None: ) -> None:
self.target_directory = target_directory self.target_directory = target_directory

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class DebugLinkReseedRandom(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
value: int = None, value: Optional[int] = None,
) -> None: ) -> None:
self.value = value self.value = value

@ -6,7 +6,7 @@ from .HDNodeType import HDNodeType
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -18,19 +18,19 @@ class DebugLinkState(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
layout_lines: List[str] = None, layout_lines: Optional[List[str]] = None,
layout: bytes = None, layout: Optional[bytes] = None,
pin: str = None, pin: Optional[str] = None,
matrix: str = None, matrix: Optional[str] = None,
mnemonic_secret: bytes = None, mnemonic_secret: Optional[bytes] = None,
node: HDNodeType = None, node: Optional[HDNodeType] = None,
passphrase_protection: bool = None, passphrase_protection: Optional[bool] = None,
reset_word: str = None, reset_word: Optional[str] = None,
reset_entropy: bytes = None, reset_entropy: Optional[bytes] = None,
recovery_fake_word: str = None, recovery_fake_word: Optional[str] = None,
recovery_word_pos: int = None, recovery_word_pos: Optional[int] = None,
reset_word_pos: int = None, reset_word_pos: Optional[int] = None,
mnemonic_type: int = None, mnemonic_type: Optional[int] = None,
) -> None: ) -> None:
self.layout_lines = layout_lines if layout_lines is not None else [] self.layout_lines = layout_lines if layout_lines is not None else []
self.layout = layout self.layout = layout

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class DebugLinkWatchLayout(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
watch: bool = None, watch: Optional[bool] = None,
) -> None: ) -> None:
self.watch = watch self.watch = watch

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,12 +16,12 @@ class DebugMoneroDiagAck(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
pd: List[int] = None, pd: Optional[List[int]] = None,
ins: int = None, ins: Optional[int] = None,
p1: int = None, p1: Optional[int] = None,
p2: int = None, p2: Optional[int] = None,
data1: bytes = None, data1: Optional[bytes] = None,
data2: bytes = None, data2: Optional[bytes] = None,
) -> None: ) -> None:
self.pd = pd if pd is not None else [] self.pd = pd if pd is not None else []
self.ins = ins self.ins = ins

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,12 +16,12 @@ class DebugMoneroDiagRequest(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
pd: List[int] = None, pd: Optional[List[int]] = None,
ins: int = None, ins: Optional[int] = None,
p1: int = None, p1: Optional[int] = None,
p2: int = None, p2: Optional[int] = None,
data1: bytes = None, data1: Optional[bytes] = None,
data2: bytes = None, data2: Optional[bytes] = None,
) -> None: ) -> None:
self.pd = pd if pd is not None else [] self.pd = pd if pd is not None else []
self.ins = ins self.ins = ins

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class Deprecated_PassphraseStateRequest(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
state: bytes = None, state: Optional[bytes] = None,
) -> None: ) -> None:
self.state = state self.state = state

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,7 +17,7 @@ class ECDHSessionKey(p.MessageType):
self, self,
*, *,
session_key: bytes, session_key: bytes,
public_key: bytes = None, public_key: Optional[bytes] = None,
) -> None: ) -> None:
self.session_key = session_key self.session_key = session_key
self.public_key = public_key self.public_key = public_key

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class EntropyAck(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
entropy: bytes = None, entropy: Optional[bytes] = None,
) -> None: ) -> None:
self.entropy = entropy self.entropy = entropy

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -6,7 +6,7 @@ from .EosAsset import EosAsset
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,9 +17,9 @@ class EosActionBuyRam(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
payer: int = None, payer: Optional[int] = None,
receiver: int = None, receiver: Optional[int] = None,
quantity: EosAsset = None, quantity: Optional[EosAsset] = None,
) -> None: ) -> None:
self.payer = payer self.payer = payer
self.receiver = receiver self.receiver = receiver

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -15,9 +15,9 @@ class EosActionBuyRamBytes(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
payer: int = None, payer: Optional[int] = None,
receiver: int = None, receiver: Optional[int] = None,
bytes: int = None, bytes: Optional[int] = None,
) -> None: ) -> None:
self.payer = payer self.payer = payer
self.receiver = receiver self.receiver = receiver

@ -6,7 +6,7 @@ from .EosPermissionLevel import EosPermissionLevel
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,9 +17,9 @@ class EosActionCommon(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
authorization: List[EosPermissionLevel] = None, authorization: Optional[List[EosPermissionLevel]] = None,
account: int = None, account: Optional[int] = None,
name: int = None, name: Optional[int] = None,
) -> None: ) -> None:
self.authorization = authorization if authorization is not None else [] self.authorization = authorization if authorization is not None else []
self.account = account self.account = account

@ -6,7 +6,7 @@ from .EosAsset import EosAsset
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,11 +17,11 @@ class EosActionDelegate(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
sender: int = None, sender: Optional[int] = None,
receiver: int = None, receiver: Optional[int] = None,
net_quantity: EosAsset = None, net_quantity: Optional[EosAsset] = None,
cpu_quantity: EosAsset = None, cpu_quantity: Optional[EosAsset] = None,
transfer: bool = None, transfer: Optional[bool] = None,
) -> None: ) -> None:
self.sender = sender self.sender = sender
self.receiver = receiver self.receiver = receiver

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -15,8 +15,8 @@ class EosActionDeleteAuth(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
account: int = None, account: Optional[int] = None,
permission: int = None, permission: Optional[int] = None,
) -> None: ) -> None:
self.account = account self.account = account
self.permission = permission self.permission = permission

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -15,10 +15,10 @@ class EosActionLinkAuth(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
account: int = None, account: Optional[int] = None,
code: int = None, code: Optional[int] = None,
type: int = None, type: Optional[int] = None,
requirement: int = None, requirement: Optional[int] = None,
) -> None: ) -> None:
self.account = account self.account = account
self.code = code self.code = code

@ -6,7 +6,7 @@ from .EosAuthorization import EosAuthorization
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,10 +17,10 @@ class EosActionNewAccount(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
creator: int = None, creator: Optional[int] = None,
name: int = None, name: Optional[int] = None,
owner: EosAuthorization = None, owner: Optional[EosAuthorization] = None,
active: EosAuthorization = None, active: Optional[EosAuthorization] = None,
) -> None: ) -> None:
self.creator = creator self.creator = creator
self.name = name self.name = name

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -15,7 +15,7 @@ class EosActionRefund(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
owner: int = None, owner: Optional[int] = None,
) -> None: ) -> None:
self.owner = owner self.owner = owner

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -15,8 +15,8 @@ class EosActionSellRam(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
account: int = None, account: Optional[int] = None,
bytes: int = None, bytes: Optional[int] = None,
) -> None: ) -> None:
self.account = account self.account = account
self.bytes = bytes self.bytes = bytes

@ -6,7 +6,7 @@ from .EosAsset import EosAsset
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,10 +17,10 @@ class EosActionTransfer(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
sender: int = None, sender: Optional[int] = None,
receiver: int = None, receiver: Optional[int] = None,
quantity: EosAsset = None, quantity: Optional[EosAsset] = None,
memo: str = None, memo: Optional[str] = None,
) -> None: ) -> None:
self.sender = sender self.sender = sender
self.receiver = receiver self.receiver = receiver

@ -6,7 +6,7 @@ from .EosAsset import EosAsset
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,10 +17,10 @@ class EosActionUndelegate(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
sender: int = None, sender: Optional[int] = None,
receiver: int = None, receiver: Optional[int] = None,
net_quantity: EosAsset = None, net_quantity: Optional[EosAsset] = None,
cpu_quantity: EosAsset = None, cpu_quantity: Optional[EosAsset] = None,
) -> None: ) -> None:
self.sender = sender self.sender = sender
self.receiver = receiver self.receiver = receiver

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class EosActionUnknown(p.MessageType):
self, self,
*, *,
data_size: int, data_size: int,
data_chunk: bytes = None, data_chunk: Optional[bytes] = None,
) -> None: ) -> None:
self.data_size = data_size self.data_size = data_size
self.data_chunk = data_chunk self.data_chunk = data_chunk

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -15,9 +15,9 @@ class EosActionUnlinkAuth(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
account: int = None, account: Optional[int] = None,
code: int = None, code: Optional[int] = None,
type: int = None, type: Optional[int] = None,
) -> None: ) -> None:
self.account = account self.account = account
self.code = code self.code = code

@ -6,7 +6,7 @@ from .EosAuthorization import EosAuthorization
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,10 +17,10 @@ class EosActionUpdateAuth(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
account: int = None, account: Optional[int] = None,
permission: int = None, permission: Optional[int] = None,
parent: int = None, parent: Optional[int] = None,
auth: EosAuthorization = None, auth: Optional[EosAuthorization] = None,
) -> None: ) -> None:
self.account = account self.account = account
self.permission = permission self.permission = permission

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -15,9 +15,9 @@ class EosActionVoteProducer(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
producers: List[int] = None, producers: Optional[List[int]] = None,
voter: int = None, voter: Optional[int] = None,
proxy: int = None, proxy: Optional[int] = None,
) -> None: ) -> None:
self.producers = producers if producers is not None else [] self.producers = producers if producers is not None else []
self.voter = voter self.voter = voter

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -15,8 +15,8 @@ class EosAsset(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
amount: int = None, amount: Optional[int] = None,
symbol: int = None, symbol: Optional[int] = None,
) -> None: ) -> None:
self.amount = amount self.amount = amount
self.symbol = symbol self.symbol = symbol

@ -8,7 +8,7 @@ from .EosAuthorizationWait import EosAuthorizationWait
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -19,10 +19,10 @@ class EosAuthorization(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
keys: List[EosAuthorizationKey] = None, keys: Optional[List[EosAuthorizationKey]] = None,
accounts: List[EosAuthorizationAccount] = None, accounts: Optional[List[EosAuthorizationAccount]] = None,
waits: List[EosAuthorizationWait] = None, waits: Optional[List[EosAuthorizationWait]] = None,
threshold: int = None, threshold: Optional[int] = None,
) -> None: ) -> None:
self.keys = keys if keys is not None else [] self.keys = keys if keys is not None else []
self.accounts = accounts if accounts is not None else [] self.accounts = accounts if accounts is not None else []

@ -6,7 +6,7 @@ from .EosPermissionLevel import EosPermissionLevel
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,8 +17,8 @@ class EosAuthorizationAccount(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
account: EosPermissionLevel = None, account: Optional[EosPermissionLevel] = None,
weight: int = None, weight: Optional[int] = None,
) -> None: ) -> None:
self.account = account self.account = account
self.weight = weight self.weight = weight

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -17,8 +17,8 @@ class EosAuthorizationKey(p.MessageType):
*, *,
type: int, type: int,
weight: int, weight: int,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
key: bytes = None, key: Optional[bytes] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.type = type self.type = type

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -15,8 +15,8 @@ class EosAuthorizationWait(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
wait_sec: int = None, wait_sec: Optional[int] = None,
weight: int = None, weight: Optional[int] = None,
) -> None: ) -> None:
self.wait_sec = wait_sec self.wait_sec = wait_sec
self.weight = weight self.weight = weight

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,8 +16,8 @@ class EosGetPublicKey(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
show_display: bool = None, show_display: Optional[bool] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.show_display = show_display self.show_display = show_display

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -15,8 +15,8 @@ class EosPermissionLevel(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
actor: int = None, actor: Optional[int] = None,
permission: int = None, permission: Optional[int] = None,
) -> None: ) -> None:
self.actor = actor self.actor = actor
self.permission = permission self.permission = permission

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -6,7 +6,7 @@ from .EosTxHeader import EosTxHeader
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -18,10 +18,10 @@ class EosSignTx(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
chain_id: bytes = None, chain_id: Optional[bytes] = None,
header: EosTxHeader = None, header: Optional[EosTxHeader] = None,
num_actions: int = None, num_actions: Optional[int] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.chain_id = chain_id self.chain_id = chain_id

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -20,7 +20,7 @@ from .EosActionVoteProducer import EosActionVoteProducer
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -32,21 +32,21 @@ class EosTxActionAck(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
common: EosActionCommon = None, common: Optional[EosActionCommon] = None,
transfer: EosActionTransfer = None, transfer: Optional[EosActionTransfer] = None,
delegate: EosActionDelegate = None, delegate: Optional[EosActionDelegate] = None,
undelegate: EosActionUndelegate = None, undelegate: Optional[EosActionUndelegate] = None,
refund: EosActionRefund = None, refund: Optional[EosActionRefund] = None,
buy_ram: EosActionBuyRam = None, buy_ram: Optional[EosActionBuyRam] = None,
buy_ram_bytes: EosActionBuyRamBytes = None, buy_ram_bytes: Optional[EosActionBuyRamBytes] = None,
sell_ram: EosActionSellRam = None, sell_ram: Optional[EosActionSellRam] = None,
vote_producer: EosActionVoteProducer = None, vote_producer: Optional[EosActionVoteProducer] = None,
update_auth: EosActionUpdateAuth = None, update_auth: Optional[EosActionUpdateAuth] = None,
delete_auth: EosActionDeleteAuth = None, delete_auth: Optional[EosActionDeleteAuth] = None,
link_auth: EosActionLinkAuth = None, link_auth: Optional[EosActionLinkAuth] = None,
unlink_auth: EosActionUnlinkAuth = None, unlink_auth: Optional[EosActionUnlinkAuth] = None,
new_account: EosActionNewAccount = None, new_account: Optional[EosActionNewAccount] = None,
unknown: EosActionUnknown = None, unknown: Optional[EosActionUnknown] = None,
) -> None: ) -> None:
self.common = common self.common = common
self.transfer = transfer self.transfer = transfer

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class EosTxActionRequest(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
data_size: int = None, data_size: Optional[int] = None,
) -> None: ) -> None:
self.data_size = data_size self.data_size = data_size

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class EthereumAddress(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
address: str = None, address: Optional[str] = None,
) -> None: ) -> None:
self.address = address self.address = address

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,8 +16,8 @@ class EthereumGetAddress(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
show_display: bool = None, show_display: Optional[bool] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.show_display = show_display self.show_display = show_display

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,8 +16,8 @@ class EthereumGetPublicKey(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
show_display: bool = None, show_display: Optional[bool] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.show_display = show_display self.show_display = show_display

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -6,7 +6,7 @@ from .HDNodeType import HDNodeType
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,8 +16,8 @@ class EthereumSignMessage(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
message: bytes = None, message: Optional[bytes] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.message = message self.message = message

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,16 +16,16 @@ class EthereumSignTx(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
address_n: List[int] = None, address_n: Optional[List[int]] = None,
nonce: bytes = None, nonce: Optional[bytes] = None,
gas_price: bytes = None, gas_price: Optional[bytes] = None,
gas_limit: bytes = None, gas_limit: Optional[bytes] = None,
to: str = None, to: Optional[str] = None,
value: bytes = None, value: Optional[bytes] = None,
data_initial_chunk: bytes = None, data_initial_chunk: Optional[bytes] = None,
data_length: int = None, data_length: Optional[int] = None,
chain_id: int = None, chain_id: Optional[int] = None,
tx_type: int = None, tx_type: Optional[int] = None,
) -> None: ) -> None:
self.address_n = address_n if address_n is not None else [] self.address_n = address_n if address_n is not None else []
self.nonce = nonce self.nonce = nonce

@ -4,7 +4,7 @@ import protobuf as p
if __debug__: if __debug__:
try: try:
from typing import Dict, List # noqa: F401 from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401 from typing_extensions import Literal # noqa: F401
except ImportError: except ImportError:
pass pass
@ -16,7 +16,7 @@ class EthereumTxAck(p.MessageType):
def __init__( def __init__(
self, self,
*, *,
data_chunk: bytes = None, data_chunk: Optional[bytes] = None,
) -> None: ) -> None:
self.data_chunk = data_chunk self.data_chunk = data_chunk

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save