Skip to content

Commit 05e8170

Browse files
committed
Refactor minor cleanups and type hints.
1 parent eedb5db commit 05e8170

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

pytonapi/methods/blockchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async def get_block_boc(self, block_id: str) -> str:
5555
method = f"v2/blockchain/blocks/{block_id}/boc"
5656
response = await self._get(method=method)
5757

58-
return response["error"] # api returns raw string so the result stores in error
58+
return response["error"] # api returns raw string so the result stores in error
5959

6060
async def get_block(self, masterchain_seqno: int) -> BlockchainBlockShards:
6161
"""

pytonapi/methods/liteserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ async def get_raw_list_block_transaction(
199199
:return: :class:`RawListBlockTransactions`
200200
"""
201201
method = f"v2/liteserver/list_block_transactions/{block_id}"
202-
params = {
202+
params: Dict[str, Union[int, str]] = {
203203
"mode": mode,
204204
"count": count
205205
}

pytonapi/methods/purchases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ async def get_purchases_history(
2626
params["before_lt"] = before_lt
2727
response = await self._get(method=method, params=params)
2828

29-
return Purchases(**response)
29+
return Purchases(**response)

pytonapi/methods/wallet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Dict, Any, Union
22

33
from pytonapi.base import AsyncTonapiClientBase
4-
from pytonapi.schema.accounts import Accounts, Account
4+
from pytonapi.schema.accounts import Accounts
55
from pytonapi.schema.events import MessageConsequences
66
from pytonapi.schema.wallet import Wallet
77

pytonapi/schema/multisig.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ class Risk(BaseModel):
1414
jettons: List[JettonQuantity]
1515
nfts: List[NftItem]
1616

17+
1718
class ChangingParameters(BaseModel):
1819
threshold: int
1920
signers: List[Address]
2021
proposers: str
2122

23+
2224
class MultisigOrder(BaseModel):
2325
address: Address
2426
order_seqno: int

pytonapi/schema/purchases.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from pytonapi.schema.accounts import AccountAddress
66

7+
78
class Metadata(BaseModel):
89
encrypted_binary: str
910
decryption_key: Optional[str] = None
@@ -32,4 +33,4 @@ class Purchase(BaseModel):
3233

3334
class Purchases(BaseModel):
3435
purchases: List[Purchase]
35-
next_from: int
36+
next_from: int

0 commit comments

Comments
 (0)