lint: Changes for flake8 7.2

This commit is contained in:
tecnovert 2025-03-30 00:54:35 +02:00
parent 447f32d6b2
commit a0c31fb87d
No known key found for this signature in database
GPG key ID: 8ED6D8750C4E3F93
12 changed files with 2 additions and 15 deletions

View file

@ -42,7 +42,6 @@ def make_rpc_func(port, auth, host="127.0.0.1"):
host = host
def rpc_func(method, params=None):
nonlocal port, auth, host
return callrpc(port, auth, method, params, host)
return rpc_func

View file

@ -159,7 +159,6 @@ def make_rpc_func(port, auth, wallet=None, host="127.0.0.1"):
host = host
def rpc_func(method, params=None, wallet_override=None):
nonlocal port, auth, wallet, host
return callrpc(
port,
auth,

View file

@ -309,7 +309,6 @@ def make_xmr_rpc2_func(
transport.set_proxy(proxy_host, proxy_port)
def rpc_func(method, params=None, wallet=None, timeout=default_timeout):
nonlocal port, auth, host, transport, tag
return callrpc_xmr2(
port,
method,
@ -345,7 +344,6 @@ def make_xmr_rpc_func(
transport.set_proxy(proxy_host, proxy_port)
def rpc_func(method, params=None, wallet=None, timeout=default_timeout):
nonlocal port, auth, host, transport, tag
return callrpc_xmr(
port,
method,

View file

@ -38,8 +38,7 @@ def make_reporthook(read_start: int, logger):
logger.info(f"Attempting to resume from byte {read_start}")
def reporthook(blocknum, blocksize, totalsize):
nonlocal read, last_percent_str, time_last, read_last, display_last, read_start
nonlocal average_buffer, abo, logger
nonlocal read, last_percent_str, time_last, read_last, display_last, abo
read += blocksize
# totalsize excludes read_start

View file

@ -101,7 +101,6 @@ def make_json_api_func(host: str, port: int):
port = port
def api_func(path=None, json_data=None, timeout=300):
nonlocal host, port
url = f"http://{host}:{port}/json"
if path is not None:
url += "/" + path
@ -765,7 +764,7 @@ def prune_script_state(now, args, config, script_state):
def main():
global read_json_api, read_json_api_wallet, coins_map
global read_json_api, read_json_api_wallet
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"-v",

View file

@ -357,7 +357,6 @@ def make_rpc_func(node_id, base_rpc_port=BASE_RPC_PORT):
auth = "test{0}:test_pass{0}".format(node_id)
def rpc_func(method, params=None, wallet=None):
nonlocal node_id, auth
return callrpc(base_rpc_port + node_id, auth, method, params, wallet)
return rpc_func

View file

@ -277,7 +277,6 @@ def make_part_cli_rpc_func(node_id):
node_id = node_id
def rpc_func(method, params=None, wallet=None):
nonlocal node_id
cmd = method
if params:
for p in params:

View file

@ -70,7 +70,6 @@ def make_rpc_func(node_id, base_rpc_port):
auth = "test{0}:test_pass{0}".format(node_id)
def rpc_func(method, params=None):
nonlocal node_id, auth
return callrpc(base_rpc_port + node_id, auth, method, params)
return rpc_func

View file

@ -257,7 +257,6 @@ def make_part_cli_rpc_func(node_id):
node_id = node_id
def rpc_func(method, params=None, wallet=None):
nonlocal node_id
cmd = method
if params:
for p in params:

View file

@ -282,7 +282,6 @@ def make_part_cli_rpc_func(node_id):
node_id = node_id
def rpc_func(method, params=None, wallet=None):
nonlocal node_id
cmd = method
if params:
for p in params:

View file

@ -113,7 +113,6 @@ class Test(BaseTest):
pi = swap_clients[0].pi(SwapTypes.XMR_SWAP)
def wait_for_unspents(delay_event, iterations=20, delay_time=0.5):
nonlocal ci
i = 0
while not delay_event.is_set():
unspents = ci.rpc_wallet("listunspentblind")

View file

@ -111,7 +111,6 @@ class Test(unittest.TestCase):
)
def test_reload(self):
global stop_test
processes = []
for i in range(3):