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:
will
2026-07-16 10:29:58 +01:00
parent b52454538b
commit 6eca11175b
10 changed files with 56 additions and 30 deletions

View File

@@ -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):