Skip to content

Commit 46360ad

Browse files
committed
bump mypy to get Unpack out of experimental, clear unused ignores
1 parent b7ace9b commit 46360ad

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ repos:
4444
additional_dependencies:
4545
- mdformat-gfm
4646
- repo: https://github.com/pre-commit/mirrors-mypy
47-
rev: v1.5.1
47+
rev: v1.9.0
4848
hooks:
4949
- id: mypy
5050
exclude: 'tests/|conftest.py'

web3/eth/async_eth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ async def unsubscribe(self, subscription_id: HexStr) -> bool:
765765

766766
@overload
767767
# mypy error: Overloaded function signatures 1 and 2 overlap with incompatible return types # noqa: E501
768-
def contract(self, address: None = None, **kwargs: Any) -> Type[AsyncContract]: # type: ignore[misc] # noqa: E501
768+
def contract(self, address: None = None, **kwargs: Any) -> Type[AsyncContract]: # type: ignore[overload-overlap] # noqa: E501
769769
...
770770

771771
@overload

web3/eth/eth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ def modify_transaction(
681681

682682
@overload
683683
# type error: Overloaded function signatures 1 and 2 overlap with incompatible return types # noqa: E501
684-
def contract(self, address: None = None, **kwargs: Any) -> Type[Contract]: # type: ignore[misc] # noqa: E501
684+
def contract(self, address: None = None, **kwargs: Any) -> Type[Contract]: # type: ignore[overload-overlap] # noqa: E501
685685
...
686686

687687
@overload

web3/gas_strategies/time_based.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ def _aggregate_miner_data(
110110
# types ignored b/c mypy has trouble inferring gas_prices: Sequence[Wei]
111111
price_percentile = percentile(gas_prices, percentile=20) # type: ignore
112112
except InsufficientData:
113-
price_percentile = min(gas_prices) # type: ignore
113+
price_percentile = min(gas_prices)
114114
yield MinerData(
115115
miner,
116116
len(set(block_hashes)),
117-
min(gas_prices), # type: ignore
117+
min(gas_prices),
118118
price_percentile,
119119
)
120120

0 commit comments

Comments
 (0)