Skip to content

Commit 7c1ce96

Browse files
committed
Fix some types
1 parent 8e32c9f commit 7c1ce96

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

web3/contract.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,8 +1346,7 @@ async def call(
13461346
self._return_data_normalizers,
13471347
self.function_identifier,
13481348
call_transaction,
1349-
# BlockIdentifier does have an Awaitable type in types.py
1350-
block_id, # type: ignore
1349+
block_id,
13511350
self.contract_abi,
13521351
self.abi,
13531352
state_override,
@@ -2193,13 +2192,13 @@ def parse_block_identifier(
21932192

21942193
async def async_parse_block_identifier(
21952194
w3: "Web3", block_identifier: BlockIdentifier
2196-
) -> Awaitable[BlockIdentifier]:
2195+
) -> BlockIdentifier:
21972196
if block_identifier is None:
21982197
return w3.eth.default_block
21992198
if isinstance(block_identifier, int):
22002199
return await async_parse_block_identifier_int(w3, block_identifier)
22012200
elif block_identifier in {"latest", "earliest", "pending", "safe", "finalized"}:
2202-
return block_identifier # type: ignore
2201+
return block_identifier
22032202
elif isinstance(block_identifier, bytes) or is_hex_encoded_block_hash(
22042203
block_identifier
22052204
):
@@ -2222,7 +2221,7 @@ def parse_block_identifier_int(w3: "Web3", block_identifier_int: int) -> BlockNu
22222221

22232222
async def async_parse_block_identifier_int(
22242223
w3: "Web3", block_identifier_int: int
2225-
) -> Awaitable[BlockNumber]:
2224+
) -> BlockNumber:
22262225
if block_identifier_int >= 0:
22272226
block_num = block_identifier_int
22282227
else:
@@ -2231,7 +2230,7 @@ async def async_parse_block_identifier_int(
22312230
block_num = last_block_num + block_identifier_int + 1
22322231
if block_num < 0:
22332232
raise BlockNumberOutofRange
2234-
return BlockNumber(block_num) # type: ignore
2233+
return BlockNumber(block_num)
22352234

22362235

22372236
def transact_with_contract_function(

0 commit comments

Comments
 (0)