Skip to content

Commit a05d3d2

Browse files
DavidRomanovizcfselmo
authored andcommitted
Use __all__ in __init__.py
1 parent a39aa9b commit a05d3d2

File tree

10 files changed

+101
-7
lines changed

10 files changed

+101
-7
lines changed

ens/__init__.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# flake8: noqa
2-
31
from .async_ens import (
42
AsyncENS,
53
)
@@ -18,3 +16,16 @@
1816
UnderfundedBid,
1917
UnownedName,
2018
)
19+
20+
__all__ = [
21+
"AsyncENS",
22+
"BaseENS",
23+
"ENS",
24+
"AddressMismatch",
25+
"BidTooLow",
26+
"InvalidLabel",
27+
"InvalidName",
28+
"UnauthorizedError",
29+
"UnderfundedBid",
30+
"UnownedName",
31+
]

web3/beacon/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
from .async_beacon import AsyncBeacon
22
from .beacon import Beacon
3+
4+
__all__ = [
5+
"AsyncBeacon",
6+
"Beacon",
7+
]

web3/contract/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@
77
ContractCaller,
88
ContractConstructor,
99
)
10+
11+
__all__ = [
12+
"AsyncContract",
13+
"AsyncContractCaller",
14+
"Contract",
15+
"ContractConstructor",
16+
]

web3/eth/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@
88
Contract,
99
Eth,
1010
)
11+
12+
__all__ = [
13+
"AsyncEth",
14+
"BaseEth",
15+
"Contract",
16+
"Eth",
17+
]

web3/middleware/__init__.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,25 @@ async def async_combine_middleware(
9292
initialized = mw(async_w3)
9393
accumulator_fn = await initialized.async_wrap_make_request(accumulator_fn)
9494
return accumulator_fn
95+
96+
97+
__all__ = [
98+
"AttributeDictMiddleware",
99+
"Middleware",
100+
"Web3Middleware",
101+
"BufferedGasEstimateMiddleware",
102+
"LocalFilterMiddleware",
103+
"FormattingMiddlewareBuilder",
104+
"GasPriceStrategyMiddleware",
105+
"ENSNameToAddressMiddleware",
106+
"ExtraDataToPOAMiddleware",
107+
"PythonicMiddleware",
108+
"SignAndSendRawMiddlewareBuilder",
109+
"StalecheckMiddlewareBuilder",
110+
"ValidationMiddleware",
111+
"AsyncWeb3",
112+
"Web3",
113+
"RPCResponse",
114+
"combine_middleware",
115+
"async_combine_middleware",
116+
]

web3/providers/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,18 @@
2626
from .auto import (
2727
AutoProvider,
2828
)
29+
30+
__all__ = [
31+
"AsyncBaseProvider",
32+
"AsyncHTTPProvider",
33+
"BaseProvider",
34+
"JSONBaseProvider",
35+
"IPCProvider",
36+
"HTTPProvider",
37+
"LegacyWebSocketProvider",
38+
"AsyncIPCProvider",
39+
"PersistentConnection",
40+
"PersistentConnectionProvider",
41+
"WebSocketProvider",
42+
"AutoProvider",
43+
]

web3/providers/eth_tester/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22
AsyncEthereumTesterProvider,
33
EthereumTesterProvider,
44
)
5+
6+
__all__ = [
7+
"AsyncEthereumTesterProvider",
8+
"EthereumTesterProvider",
9+
]

web3/providers/persistent/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@
1313
from .websocket import (
1414
WebSocketProvider,
1515
)
16+
17+
__all__ = [
18+
"PersistentConnectionProvider",
19+
"PersistentConnection",
20+
"RequestProcessor",
21+
"AsyncIPCProvider",
22+
"WebSocketProvider",
23+
]

web3/providers/rpc/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@
44
from .rpc import (
55
HTTPProvider,
66
)
7+
8+
__all__ = [
9+
"AsyncHTTPProvider",
10+
"HTTPProvider",
11+
]

web3/utils/__init__.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,26 @@
33
classify as breaking changes.
44
"""
55

6-
from .abi import ( # NOQA
6+
from .abi import (
77
get_abi_input_names,
88
get_abi_output_names,
99
)
10-
from .address import get_create_address # NOQA
11-
from .async_exception_handling import ( # NOQA
10+
from .address import get_create_address
11+
from .async_exception_handling import (
1212
async_handle_offchain_lookup,
1313
)
14-
from .caching import ( # NOQA
14+
from .caching import (
1515
SimpleCache,
1616
)
17-
from .exception_handling import ( # NOQA
17+
from .exception_handling import (
1818
handle_offchain_lookup,
1919
)
20+
21+
__all__ = [
22+
"get_abi_input_names",
23+
"get_abi_output_names",
24+
"get_create_address",
25+
"async_handle_offchain_lookup",
26+
"SimpleCache",
27+
"handle_offchain_lookup",
28+
]

0 commit comments

Comments
 (0)