Skip to content

Commit bc43270

Browse files
committed
test: refactor: remove unnecessary nonlocal
Since we're only mutating, and not reassigning, we don't need to declare `events` as `nonlocal`.
1 parent 326db63 commit bc43270

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

test/functional/interface_usdt_net.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ def check_p2p_message(event, is_inbound):
139139
checked_outbound_version_msg += 1
140140

141141
def handle_inbound(_, data, __):
142-
nonlocal events
143142
event = ctypes.cast(data, ctypes.POINTER(P2PMessage)).contents
144143
events.append((event, True))
145144

test/functional/interface_usdt_validation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ def __repr__(self):
9797
usdt_contexts=[ctx], debug=0)
9898

9999
def handle_blockconnected(_, data, __):
100-
nonlocal events
101100
event = ctypes.cast(data, ctypes.POINTER(Block)).contents
102101
self.log.info(f"handle_blockconnected(): {event}")
103102
events.append(event)

0 commit comments

Comments
 (0)