From 99ca41c0ad9336c6eb393c46bdd52f63708ffd11 Mon Sep 17 00:00:00 2001 From: Ataf Fazledin Ahamed Date: Tue, 22 Aug 2023 23:03:31 +0600 Subject: [PATCH] Fixed error in `NamedElementOnion` at datastructures.py --- web3/datastructures.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/web3/datastructures.py b/web3/datastructures.py index dfae1b7dca..670ad16bef 100644 --- a/web3/datastructures.py +++ b/web3/datastructures.py @@ -261,11 +261,8 @@ def __iter__(self) -> Iterator[TKey]: def __add__(self, other: Any) -> "NamedElementOnion[TKey, TValue]": if not isinstance(other, NamedElementOnion): - raise NotImplemented( - "You can only combine with another NamedElementOnion" - ) - combined = self._queue.copy() - combined.update(other._queue) + # you can only combine with another ``NamedElementOnion`` + return NotImplemented return NamedElementOnion(cast(List[Any], combined.items())) def __contains__(self, element: Any) -> bool: