Skip to content

Commit

Permalink
Use __all__ for exporting modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Uxio0 committed Jul 12, 2022
1 parent 91e0848 commit 27202d7
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 5 deletions.
24 changes: 24 additions & 0 deletions gnosis/eth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from .ethereum_client import (
EthereumClient,
EthereumClientProvider,
EthereumTxSent,
FromAddressNotFound,
GasLimitExceeded,
InsufficientFunds,
Expand All @@ -17,3 +18,26 @@
)
from .ethereum_network import EthereumNetwork, EthereumNetworkNotSupported
from .exceptions import InvalidERC20Info, InvalidERC721Info, ParityTraceDecodeException

__all__ = [
"EthereumClient",
"EthereumClientProvider",
"EthereumTxSent",
"FromAddressNotFound",
"GasLimitExceeded",
"InsufficientFunds",
"InvalidNonce",
"NonceTooHigh",
"NonceTooLow",
"ReplacementTransactionUnderpriced",
"SenderAccountNotFoundInNode",
"TransactionAlreadyImported",
"TransactionQueueLimitReached",
"TxSpeed",
"UnknownAccount",
"EthereumNetwork",
"EthereumNetworkNotSupported",
"InvalidERC20Info",
"InvalidERC721Info",
"ParityTraceDecodeException",
]
12 changes: 12 additions & 0 deletions gnosis/eth/clients/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,15 @@
EtherscanRateLimitError,
)
from .sourcify import Sourcify

__all__ = [
"BlockscoutClient",
"BlockscoutClientException",
"BlockScoutConfigurationProblem",
"ContractMetadata",
"EtherscanClient",
"EtherscanClientConfigurationProblem",
"EtherscanClientException",
"EtherscanRateLimitError",
"Sourcify",
]
24 changes: 24 additions & 0 deletions gnosis/eth/oracles/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,27 @@
YearnOracle,
ZerionComposedOracle,
)

__all__ = [
"AaveOracle",
"BalancerOracle",
"CannotGetPriceFromOracle",
"ComposedPriceOracle",
"CreamOracle",
"CurveOracle",
"EnzymeOracle",
"InvalidPriceFromOracle",
"KyberOracle",
"MooniswapOracle",
"OracleException",
"PoolTogetherOracle",
"PriceOracle",
"PricePoolOracle",
"SushiswapOracle",
"UnderlyingToken",
"UniswapOracle",
"UniswapV2Oracle",
"UsdPricePoolOracle",
"YearnOracle",
"ZerionComposedOracle",
]
6 changes: 6 additions & 0 deletions gnosis/protocol/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# flake8: noqa F401
from .gnosis_protocol_api import GnosisProtocolAPI
from .order import Order, OrderKind

__all__ = [
"GnosisProtocolAPI",
"Order",
"OrderKind",
]
16 changes: 16 additions & 0 deletions gnosis/safe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,19 @@
)
from .proxy_factory import ProxyFactory
from .safe import Safe, SafeOperation, SafeTx

__all__ = [
"CannotEstimateGas",
"CouldNotPayGasWithEther",
"InvalidChecksumAddress",
"InvalidInternalTx",
"InvalidMultisigTx",
"InvalidPaymentToken",
"InvalidSignaturesProvided",
"SafeServiceException",
"SignatureNotProvidedByOwner",
"ProxyFactory",
"Safe",
"SafeOperation",
"SafeTx",
]
3 changes: 1 addition & 2 deletions gnosis/safe/multi_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
from hexbytes import HexBytes
from web3 import Web3

from gnosis.eth import EthereumClient
from gnosis.eth import EthereumClient, EthereumTxSent
from gnosis.eth.contracts import get_multi_send_contract
from gnosis.eth.ethereum_client import EthereumTxSent
from gnosis.eth.typing import EthereumData
from gnosis.eth.utils import fast_bytes_to_checksum_address, fast_is_checksum_address

Expand Down
3 changes: 1 addition & 2 deletions gnosis/safe/proxy_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from eth_typing import ChecksumAddress
from web3.contract import Contract

from gnosis.eth import EthereumClient
from gnosis.eth import EthereumClient, EthereumTxSent
from gnosis.eth.contracts import (
get_paying_proxy_deployed_bytecode,
get_proxy_1_0_0_deployed_bytecode,
Expand All @@ -16,7 +16,6 @@
get_proxy_factory_V1_0_0_contract,
get_proxy_factory_V1_1_1_contract,
)
from gnosis.eth.ethereum_client import EthereumTxSent
from gnosis.eth.utils import compare_byte_code, fast_is_checksum_address

try:
Expand Down
2 changes: 1 addition & 1 deletion gnosis/safe/safe.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from web3.exceptions import BadFunctionCallOutput
from web3.types import BlockIdentifier, Wei

from gnosis.eth import EthereumClient, EthereumTxSent
from gnosis.eth.constants import GAS_CALL_DATA_BYTE, NULL_ADDRESS, SENTINEL_ADDRESS
from gnosis.eth.contracts import (
get_compatibility_fallback_handler_V1_3_0_contract,
Expand All @@ -23,7 +24,6 @@
get_safe_V1_1_1_contract,
get_safe_V1_3_0_contract,
)
from gnosis.eth.ethereum_client import EthereumClient, EthereumTxSent
from gnosis.eth.utils import (
fast_bytes_to_checksum_address,
fast_is_checksum_address,
Expand Down

0 comments on commit 27202d7

Please sign in to comment.