Skip to content

Commit 7e811be

Browse files
authored
Fix type errors (software-mansion#769)
1 parent 2cc993e commit 7e811be

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

starknet_py/tests/e2e/client/client_test.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
Call,
1616
DeclareTransaction,
1717
DeployAccountTransaction,
18+
GatewayBlock,
1819
Invoke,
1920
InvokeTransaction,
2021
L1HandlerTransaction,
@@ -90,7 +91,7 @@ async def test_get_block_by_hash(
9091
assert block.block_hash == block_with_declare_hash
9192
assert len(block.transactions) != 0
9293

93-
if isinstance(client, GatewayClient):
94+
if isinstance(block, GatewayBlock):
9495
assert block.gas_price > 0
9596

9697

@@ -106,7 +107,7 @@ async def test_get_block_by_number(
106107
assert block.block_hash == block_with_declare_hash
107108
assert len(block.transactions) != 0
108109

109-
if isinstance(client, GatewayClient):
110+
if isinstance(block, GatewayBlock):
110111
assert block.gas_price > 0
111112

112113

starknet_py/tests/e2e/client/full_node_test.py

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from starkware.starknet.public.abi import get_storage_var_address
66

77
from starknet_py.net.client_errors import ClientError
8+
from starknet_py.net.client_models import DeclareTransaction
89

910

1011
@pytest.mark.run_on_devnet
@@ -16,6 +17,7 @@ async def test_node_get_declare_transaction_by_block_number_and_index(
1617
block_number=block_with_declare_number, index=0
1718
)
1819

20+
assert isinstance(tx, DeclareTransaction)
1921
assert tx.hash == declare_transaction_hash
2022
assert tx.class_hash == class_hash
2123
assert tx.version == 1

starknet_py/utils/data_transformer/data_transformer_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def test_allow_underscores_in_abi():
639639
({}, "Result()"),
640640
],
641641
)
642-
def test_result_warpper_as_str(result_dict, expected):
642+
def test_result_wrapper_as_str(result_dict, expected):
643643
assert str(construct_result_object(result_dict)) == expected
644644

645645

starknet_py/utils/typed_data.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def _encode_value(self, type_name: str, value: Union[int, str, dict, list]) -> i
5454
value = cast(Union[int, str], value)
5555
return int(get_hex(value), 16)
5656

57-
def _encode_data(self, type_name: str, data: dict) -> List[str]:
57+
def _encode_data(self, type_name: str, data: dict) -> List[int]:
5858
values = []
5959
for param in self.types[type_name]:
6060
encoded_value = self._encode_value(param.type, data[param.name])

0 commit comments

Comments
 (0)