Skip to content

Commit f177ec9

Browse files
committed
Fix isort issues after refactor + rebase; add newsfragment
1 parent 180a57d commit f177ec9

File tree

5 files changed

+23
-19
lines changed

5 files changed

+23
-19
lines changed

newsfragments/2753.internal.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Organize the ``eth`` module into separate files for better readability.

web3/_utils/module_testing/eth_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
construct_error_generator_middleware,
7676
)
7777
from web3.types import ( # noqa: F401
78-
BlockData,
7978
ENS,
79+
BlockData,
8080
FilterParams,
8181
LogReceipt,
8282
Nonce,

web3/eth/async_eth.py

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import asyncio
2-
import warnings
32
from typing import (
43
Awaitable,
54
Callable,
@@ -9,27 +8,28 @@
98
Type,
109
Union,
1110
)
12-
13-
from hexbytes import (
14-
HexBytes,
15-
)
16-
from web3._utils.blocks import (
17-
select_method_for_block_identifier,
18-
)
19-
from web3._utils.filters import AsyncFilter, select_filter_method
20-
from web3.utils import (
21-
async_handle_offchain_lookup,
22-
)
11+
import warnings
2312

2413
from eth_typing import (
2514
Address,
2615
BlockNumber,
2716
ChecksumAddress,
2817
HexStr,
2918
)
19+
from hexbytes import (
20+
HexBytes,
21+
)
22+
23+
from web3._utils.blocks import (
24+
select_method_for_block_identifier,
25+
)
3026
from web3._utils.fee_utils import (
3127
async_fee_history_priority_fee,
3228
)
29+
from web3._utils.filters import (
30+
AsyncFilter,
31+
select_filter_method,
32+
)
3333
from web3._utils.rpc_abi import (
3434
RPC,
3535
)
@@ -51,11 +51,11 @@
5151
default_root_munger,
5252
)
5353
from web3.types import (
54+
ENS,
5455
BlockData,
5556
BlockIdentifier,
5657
BlockParams,
5758
CallOverride,
58-
ENS,
5959
FeeHistory,
6060
FilterParams,
6161
LogReceipt,
@@ -67,6 +67,9 @@
6767
Wei,
6868
_Hash32,
6969
)
70+
from web3.utils import (
71+
async_handle_offchain_lookup,
72+
)
7073

7174

7275
class AsyncEth(BaseEth):
@@ -506,6 +509,8 @@ async def get_storage_at(
506509
) -> HexBytes:
507510
return await self._get_storage_at(account, position, block_identifier)
508511

512+
# eth_newFilter, eth_newBlockFilter, eth_newPendingTransactionFilter
513+
509514
filter: Method[
510515
Callable[[Optional[Union[str, FilterParams, HexStr]]], Awaitable[AsyncFilter]]
511516
] = Method(

web3/eth/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
List,
44
NoReturn,
55
Optional,
6-
overload,
76
Sequence,
87
Tuple,
98
Type,
109
Union,
10+
overload,
1111
)
1212

1313
from eth_account import (
@@ -25,6 +25,7 @@
2525
from eth_utils.toolz import (
2626
assoc,
2727
)
28+
2829
from web3._utils.empty import (
2930
Empty,
3031
empty,
@@ -39,9 +40,9 @@
3940
Module,
4041
)
4142
from web3.types import (
43+
ENS,
4244
BlockIdentifier,
4345
CallOverride,
44-
ENS,
4546
FilterParams,
4647
GasPriceStrategy,
4748
TxParams,

web3/eth/main.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
ChecksumAddress,
1818
HexStr,
1919
)
20-
from eth_utils import (
21-
is_string,
22-
)
2320
from eth_utils.toolz import (
2421
merge,
2522
)

0 commit comments

Comments
 (0)