Skip to content

Commit

Permalink
Merge pull request #1038 from Exef/exef/export-datastructures
Browse files Browse the repository at this point in the history
Move all used datastructures from utils module
  • Loading branch information
pipermerriam authored Sep 3, 2018
2 parents 71daad1 + 7d25e54 commit 0605962
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ Fetch various data about the current state of the ERC20 contract.
>>> erc20.functions.decimals().call()
0
>>> erc20.functions.totalSupply().call()
2038
2039

Get the balance of an account address.

Expand Down
6 changes: 3 additions & 3 deletions tests/core/middleware/test_stalecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
patch,
)

from web3.datastructures import (
AttributeDict,
)
from web3.middleware import (
make_stalecheck_middleware,
)
from web3.middleware.stalecheck import (
StaleBlockchain,
_isfresh,
)
from web3.utils.datastructures import (
AttributeDict,
)


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/core/utilities/test_attributedict.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from web3.utils.datastructures import (
from web3.datastructures import (
AttributeDict,
)

Expand Down
1 change: 0 additions & 1 deletion web3/utils/datastructures.py → web3/datastructures.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from collections import (
Hashable,
Mapping,
Expand Down
6 changes: 3 additions & 3 deletions web3/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
is_list_like,
)

from web3.datastructures import (
NamedElementOnion,
)
from web3.exceptions import (
CannotHandleRequest,
UnhandledRequest,
Expand All @@ -22,9 +25,6 @@
from web3.providers import (
AutoProvider,
)
from web3.utils.datastructures import (
NamedElementOnion,
)
from web3.utils.empty import (
empty,
)
Expand Down
2 changes: 1 addition & 1 deletion web3/middleware/attrdict.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
is_dict,
)

from web3.utils.datastructures import (
from web3.datastructures import (
AttributeDict,
)
from web3.utils.toolz import (
Expand Down
6 changes: 3 additions & 3 deletions web3/providers/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
to_dict,
)

from web3.datastructures import (
NamedElementOnion,
)
from web3.middleware import (
http_retry_request_middleware,
)
from web3.utils.datastructures import (
NamedElementOnion,
)
from web3.utils.http import (
construct_user_agent,
)
Expand Down
6 changes: 3 additions & 3 deletions web3/utils/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
to_tuple,
)

from web3.datastructures import (
AttributeDict,
)
from web3.exceptions import (
MismatchedABI,
)
from web3.utils.datastructures import (
AttributeDict,
)
from web3.utils.encoding import (
hexstr_if_str,
to_bytes,
Expand Down

0 comments on commit 0605962

Please sign in to comment.