mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-11 21:20:39 +02:00
lint: remove E731 Ruff ignore
Replace assigned lambdas with local functions so Ruff can enforce E731. For platform-specific immutable file cleanup, store the command as data instead of creating conditional callbacks.
This commit is contained in:
@@ -610,11 +610,15 @@ class P2PInterface(P2PConnection):
|
||||
wait_until_helper_internal(test_function, timeout=timeout, lock=p2p_lock, timeout_factor=self.timeout_factor, check_interval=check_interval)
|
||||
|
||||
def wait_for_connect(self, *, timeout=60):
|
||||
test_function = lambda: self.is_connected
|
||||
def test_function():
|
||||
return self.is_connected
|
||||
|
||||
self.wait_until(test_function, timeout=timeout, check_connected=False)
|
||||
|
||||
def wait_for_disconnect(self, *, timeout=60):
|
||||
test_function = lambda: not self.is_connected
|
||||
def test_function():
|
||||
return not self.is_connected
|
||||
|
||||
self.wait_until(test_function, timeout=timeout, check_connected=False)
|
||||
|
||||
def wait_for_reconnect(self, *, timeout=60):
|
||||
|
||||
Reference in New Issue
Block a user