Skip to content

Commit

Permalink
Type fixups after eth-utils upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
carver committed Aug 31, 2020
1 parent 19e47dc commit 6fb95c7
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion web3/_utils/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
to_dict,
to_list,
)
from eth_utils.curried import ( # type: ignore
from eth_utils.curried import (
apply_formatter_at_index,
)
from eth_utils.toolz import (
Expand Down
8 changes: 7 additions & 1 deletion web3/_utils/method_formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
Collection,
Dict,
Iterable,
Tuple,
Union,
)

from eth_utils.curried import ( # type: ignore
from eth_utils.curried import (
apply_formatter_at_index,
apply_formatter_if,
apply_formatter_to_array,
Expand Down Expand Up @@ -299,7 +300,12 @@ def apply_list_to_array_formatter(formatter: Any) -> Callable[..., Any]:
)


estimate_gas_without_block_id: Callable[[Dict[str, Any]], Dict[str, Any]]
estimate_gas_without_block_id = apply_formatter_at_index(transaction_param_formatter, 0)
estimate_gas_with_block_id: Callable[
[Tuple[Dict[str, Any], Union[str, int]]],
Tuple[Dict[str, Any], int]
]
estimate_gas_with_block_id = apply_formatters_to_sequence([
transaction_param_formatter,
block_number_formatter,
Expand Down
2 changes: 1 addition & 1 deletion web3/_utils/rpc_abi.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from eth_utils import (
to_dict,
)
from eth_utils.curried import ( # type: ignore
from eth_utils.curried import (
apply_formatter_at_index,
)
from eth_utils.toolz import (
Expand Down
2 changes: 1 addition & 1 deletion web3/_utils/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
is_list_like,
is_string,
)
from eth_utils.curried import ( # type: ignore
from eth_utils.curried import (
apply_formatter_to_array,
)
from eth_utils.hexadecimal import (
Expand Down
2 changes: 1 addition & 1 deletion web3/method.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
)
import warnings

from eth_utils.curried import ( # type: ignore
from eth_utils.curried import (
to_tuple,
)
from eth_utils.toolz import (
Expand Down
2 changes: 1 addition & 1 deletion web3/middleware/geth_poa.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from eth_utils.curried import ( # type: ignore
from eth_utils.curried import (
apply_formatters_to_dict,
apply_key_map,
)
Expand Down
2 changes: 1 addition & 1 deletion web3/middleware/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Callable,
)

from eth_utils.curried import ( # type: ignore
from eth_utils.curried import (
apply_formatter_at_index,
apply_formatter_if,
apply_formatters_to_dict,
Expand Down
2 changes: 1 addition & 1 deletion web3/providers/eth_tester/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
is_hex,
is_string,
)
from eth_utils.curried import ( # type: ignore
from eth_utils.curried import (
apply_formatter_if,
apply_formatters_to_dict,
)
Expand Down

0 comments on commit 6fb95c7

Please sign in to comment.