Skip to content

Commit 36cd496

Browse files
authored
Clean up elif statement (#2179)
- removed unnecessary statement
1 parent fb8a329 commit 36cd496

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

newsfragments/2179.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clean up elif statement in contract.py

web3/contract.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,7 @@ def _set_function_info(self) -> None:
887887
self.args,
888888
self.kwargs
889889
)
890-
if self.function_identifier is FallbackFn:
891-
self.selector = encode_hex(b'')
892-
elif self.function_identifier is ReceiveFn:
890+
if self.function_identifier in [FallbackFn, ReceiveFn]:
893891
self.selector = encode_hex(b'')
894892
elif is_text(self.function_identifier):
895893
# https://github.com/python/mypy/issues/4976

0 commit comments

Comments
 (0)