Skip to content

Commit e3493c3

Browse files
fix(typecheck): remove unused type: ignore[return-value] on get_weth_address
_weth_address_cache is typed as ChecksumAddress (same as return type), so the ignore comment is now redundant and mypy correctly flags it. Git-Session-Id: c95ac4a4-64bd-42b3-9f79-c55ca4dfb9cf
1 parent d464d8f commit e3493c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎uniswap/uniswap.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ def get_token(self, address: AddressLike, abi_name: str = "erc20") -> ERC20Token
17041704
def get_weth_address(self) -> ChecksumAddress:
17051705
"""Retrieves the WETH address from the contracts (which may vary between chains)."""
17061706
if hasattr(self, "_weth_address_cache"):
1707-
return self._weth_address_cache # type: ignore[return-value]
1707+
return self._weth_address_cache
17081708
if self.version == 1:
17091709
address: ChecksumAddress = self.w3.to_checksum_address(WETH9_ADDRESS)
17101710
elif self.version == 2:

0 commit comments

Comments
 (0)