Skip to content

Commit

Permalink
Revert changes made to ens test
Browse files Browse the repository at this point in the history
Remove docs from events iter
Fix docstring formatting
  • Loading branch information
reedsa committed Sep 12, 2024
1 parent 53c5ea9 commit e1d16e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions tests/ens/test_offchain_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ def test_offchain_resolver_function_call_raises_with_ccip_read_disabled(
with pytest.raises(OffchainLookup):
offchain_resolver.functions.resolve(
ens_encode_name("offchainexample.eth"),
ENCODED_ADDR_CALLDATA.encode(),
ENCODED_ADDR_CALLDATA,
).call(ccip_read_enabled=False)

# pass flag on specific call via ContractCaller is also an option
with pytest.raises(OffchainLookup):
offchain_resolver.caller(ccip_read_enabled=False).resolve(
ens_encode_name("offchainexample.eth"),
ENCODED_ADDR_CALLDATA.encode(),
ENCODED_ADDR_CALLDATA,
)


Expand Down
5 changes: 0 additions & 5 deletions web3/contract/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,6 @@ def __getitem__(self, event_name: str) -> "ContractEvent":
return getattr(self, event_name)

def __iter__(self) -> Iterable["ContractEvent"]:
"""
Iterate over supported
:return: Iterable of :class:`ContractEvent`
"""
for event in self._events:
yield self[event["name"]]

Expand Down
6 changes: 3 additions & 3 deletions web3/utils/abi.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ def get_abi_element(
**kwargs: Optional[Any],
) -> ABIElement:
"""
Return the interface for an ``ABIElement`` from the `abi` that matches the provided
identifier and arguments.
Return the interface for an ``ABIElement`` from the ``abi`` that matches the
provided identifier and arguments.
The ``ABIElementIdentifier`` value may be a function name, signature, or a
``FallbackFn`` or ``ReceiveFn``. When named arguments (``args``) and/or keyword args
Expand Down Expand Up @@ -607,7 +607,7 @@ def get_event_abi(
"""
.. warning::
This function is deprecated. It is unable to distinguish between
overloaded events. Use `get_abi_element` instead.
overloaded events. Use ``get_abi_element`` instead.
Find the event interface with the given name and/or arguments.
Expand Down

0 comments on commit e1d16e5

Please sign in to comment.