From c94dd774445511db22c2c9b4f3147381d0925dad Mon Sep 17 00:00:00 2001 From: guoruyuan Date: Fri, 7 Jan 2022 18:26:14 +0800 Subject: [PATCH] fixed lint issues --- src/solana/rpc/core.py | 4 ++-- src/solana/rpc/types.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/solana/rpc/core.py b/src/solana/rpc/core.py index 4c87496f..46457bbb 100644 --- a/src/solana/rpc/core.py +++ b/src/solana/rpc/core.py @@ -359,11 +359,11 @@ def _request_airdrop_args( def _send_raw_transaction_args( self, txn: Union[bytes, str], opts: types.TxOpts - ) -> Tuple[types.RPCMethod, str, Dict[str, Union[bool, Commitment, str]]]: + ) -> Tuple[types.RPCMethod, str, Dict[str, Union[bool, Commitment, str, int]]]: if isinstance(txn, bytes): txn = b64encode(txn).decode("utf-8") - params = { + params: Dict[str, Union[bool, Commitment, str, int]] = { self._skip_preflight_key: opts.skip_preflight, self._preflight_comm_key: opts.preflight_commitment, self._encoding_key: "base64", diff --git a/src/solana/rpc/types.py b/src/solana/rpc/types.py index 27ad3fb9..1da6a2e9 100644 --- a/src/solana/rpc/types.py +++ b/src/solana/rpc/types.py @@ -89,7 +89,7 @@ class TxOpts(NamedTuple): """If true, skip the preflight transaction checks.""" preflight_commitment: Commitment = Finalized """Commitment level to use for preflight.""" - max_retries: int = None + max_retries: Optional[int] = None """Maximum number of times for the RPC node to retry sending the transaction to the leader. If this parameter not provided, the RPC node will retry the transaction until it is finalized or until the blockhash expires