From bf5239f32618a0e340733dc1954a32305c384368 Mon Sep 17 00:00:00 2001 From: nikunjkumar05 Date: Tue, 24 Mar 2026 00:00:23 +0530 Subject: [PATCH] fix-bugs: squash branch changes into one commit --- contrib/api/generate-python-docs.py | 2 +- contrib/msggen/msggen/gen/grpc/convert.py | 26 ++++++++--------- contrib/msggen/msggen/gen/grpc/proto.py | 4 +-- contrib/msggen/msggen/gen/grpc/server.py | 5 ++-- contrib/msggen/msggen/gen/grpc/unconvert.py | 28 +++++++++---------- contrib/msggen/msggen/gen/grpc2py.py | 2 +- contrib/msggen/msggen/gen/rpc/rust.py | 25 +++++++++-------- .../pyln/grpc/node_pb2_grpc.py | 2 +- tests/autogenerate-rpc-examples.py | 16 +++++------ tests/test_closing.py | 2 +- tests/test_connection.py | 4 +-- tests/test_misc.py | 4 +-- tests/test_opening.py | 2 +- tests/test_plugin.py | 12 ++++---- tests/test_reckless.py | 4 +-- tests/test_wallet.py | 4 +-- tests/test_xpay.py | 2 +- 17 files changed, 73 insertions(+), 71 deletions(-) diff --git a/contrib/api/generate-python-docs.py b/contrib/api/generate-python-docs.py index bfbf664967c7..f8b93e0cb011 100755 --- a/contrib/api/generate-python-docs.py +++ b/contrib/api/generate-python-docs.py @@ -116,7 +116,7 @@ def generate_docs(output_dir: Path, repo_root: Path): """Generate documentation for all packages.""" - print(f"Generating Python documentation for all workspace packages...") + print("Generating Python documentation for all workspace packages...") print(f"Output directory: {output_dir}") # Clean and create output directory diff --git a/contrib/msggen/msggen/gen/grpc/convert.py b/contrib/msggen/msggen/gen/grpc/convert.py index a65c447db4fc..0b1679d8a84e 100644 --- a/contrib/msggen/msggen/gen/grpc/convert.py +++ b/contrib/msggen/msggen/gen/grpc/convert.py @@ -65,14 +65,14 @@ def generate_composite(self, prefix, field: CompositeField, override=None): # The inner conversion applied to each element in the # array. The current item is called `i` mapping = { - "hex": f"hex::decode(i).unwrap()", - "secret": f"i.to_vec()", - "hash": f">::as_ref(&i).to_vec()", - "short_channel_id": f"i.to_string()", - "short_channel_id_dir": f"i.to_string()", - "pubkey": f"i.serialize().to_vec()", - "txid": f"hex::decode(i).unwrap()", - }.get(typ, f"i.into()") + "hex": "hex::decode(i).unwrap()", + "secret": "i.to_vec()", + "hash": ">::as_ref(&i).to_vec()", + "short_channel_id": "i.to_string()", + "short_channel_id_dir": "i.to_string()", + "pubkey": "i.serialize().to_vec()", + "txid": "hex::decode(i).unwrap()", + }.get(typ, "i.into()") self.write(f"// Field: {f.path}\n", numindent=3) if not f.optional: @@ -138,7 +138,7 @@ def generate_composite(self, prefix, field: CompositeField, override=None): ) if f.deprecated: - self.write(f"#[allow(deprecated)]\n", numindent=3) + self.write("#[allow(deprecated)]\n", numindent=3) self.write(f"{name}: {rhs}, // Rule #2 for type {typ}\n", numindent=3) elif isinstance(f, CompositeField): @@ -149,10 +149,10 @@ def generate_composite(self, prefix, field: CompositeField, override=None): rhs = f"c.{name}.map(|v| v.into())" self.write(f"{name}: {rhs},\n", numindent=3) self.write( - f"""\ - }} - }} - }} + """\ + } + } + } """ ) diff --git a/contrib/msggen/msggen/gen/grpc/proto.py b/contrib/msggen/msggen/gen/grpc/proto.py index 3f2b981ab644..22da93fe57c9 100644 --- a/contrib/msggen/msggen/gen/grpc/proto.py +++ b/contrib/msggen/msggen/gen/grpc/proto.py @@ -158,7 +158,7 @@ def generate_service(self, service: Service) -> None: ) self.write( - f"""}} + """} """ ) @@ -228,7 +228,7 @@ def generate_message(self, message: CompositeField, typename_override=None): def generate(self, service: Service) -> None: """Generate the GRPC protobuf file and write to `dest`""" - self.write(f"""syntax = "proto3";\npackage cln;\n""") + self.write("""syntax = "proto3";\npackage cln;\n""") self.write( """ // This file was automatically derived from the JSON-RPC schemas in diff --git a/contrib/msggen/msggen/gen/grpc/server.py b/contrib/msggen/msggen/gen/grpc/server.py index 8018e8eca85f..1a0f5531da7a 100644 --- a/contrib/msggen/msggen/gen/grpc/server.py +++ b/contrib/msggen/msggen/gen/grpc/server.py @@ -28,7 +28,7 @@ def write(self, text: str, numindent: Optional[int] = None): def generate(self, service: Service) -> None: self.write( - f"""\ + """\ use crate::pb::node_server::Node; use crate::pb; use cln_rpc::{{Request, Response, ClnRpc}}; @@ -113,7 +113,8 @@ def generate(self, service: Service) -> None: #[tonic::async_trait] impl Node for Server {{ - """, + """ + .replace("{{", "{").replace("}}", "}"), numindent=0, ) diff --git a/contrib/msggen/msggen/gen/grpc/unconvert.py b/contrib/msggen/msggen/gen/grpc/unconvert.py index 73984f75a47a..d15c33acfe11 100644 --- a/contrib/msggen/msggen/gen/grpc/unconvert.py +++ b/contrib/msggen/msggen/gen/grpc/unconvert.py @@ -49,21 +49,21 @@ def generate_composite(self, prefix, field: CompositeField, override=None) -> No if isinstance(f, ArrayField): typ = f.itemtype.typename mapping = { - "hex": f"hex::encode(s)", - "u32": f"s", - "secret": f"s.try_into().unwrap()", - "hash": f"Sha256::from_slice(&s).unwrap()", - "short_channel_id": f"cln_rpc::primitives::ShortChannelId::from_str(&s).unwrap()", - "short_channel_id_dir": f"cln_rpc::primitives::ShortChannelIdDir::from_str(&s).unwrap()", - "pubkey": f"PublicKey::from_slice(&s).unwrap()", - "txid": f"hex::encode(s)", - }.get(typ, f"s.into()") + "hex": "hex::encode(s)", + "u32": "s", + "secret": "s.try_into().unwrap()", + "hash": "Sha256::from_slice(&s).unwrap()", + "short_channel_id": "cln_rpc::primitives::ShortChannelId::from_str(&s).unwrap()", + "short_channel_id_dir": "cln_rpc::primitives::ShortChannelIdDir::from_str(&s).unwrap()", + "pubkey": "PublicKey::from_slice(&s).unwrap()", + "txid": "hex::encode(s)", + }.get(typ, "s.into()") # TODO fix properly if typ in ["ListtransactionsTransactionsType"]: continue if name == "state_changes": - self.write(f" state_changes: None,") + self.write(" state_changes: None,") continue if not f.optional: @@ -147,10 +147,10 @@ def generate_composite(self, prefix, field: CompositeField, override=None) -> No self.write(f"{name}: {rhs},\n", numindent=3) self.write( - f"""\ - }} - }} - }} + """\ + } + } + } """ ) diff --git a/contrib/msggen/msggen/gen/grpc2py.py b/contrib/msggen/msggen/gen/grpc2py.py index 9a1feba9aa4f..12a57086d0a5 100644 --- a/contrib/msggen/msggen/gen/grpc2py.py +++ b/contrib/msggen/msggen/gen/grpc2py.py @@ -207,7 +207,7 @@ def {converter_name}(m): cleanup=False, ) - self.write(f" }})\n", cleanup=False) + self.write(" }})\n", cleanup=False) # Add ourselves to the converters so if we were generated as a # dependency for a composite they can find us again. We have diff --git a/contrib/msggen/msggen/gen/rpc/rust.py b/contrib/msggen/msggen/gen/rpc/rust.py index b2fa76251666..a4dcb19f2d40 100644 --- a/contrib/msggen/msggen/gen/rpc/rust.py +++ b/contrib/msggen/msggen/gen/rpc/rust.py @@ -179,10 +179,10 @@ def gen_enum(e, meta, override): norm = v.normalized() decl += f' {typename}::{norm} => "{norm}",\n' decl += dedent( - f"""\ - }}.to_string() - }} - }} + """\ + }.to_string() + } + } """ ) @@ -196,7 +196,7 @@ def gen_enum(e, meta, override): defi += rename_if_necessary(str(e.name), e.name.normalized()) defi += f" pub {e.name.normalized()}: {typename},\n" else: - defi = f' #[serde(skip_serializing_if = "Option::is_none")]\n' + defi = ' #[serde(skip_serializing_if = "Option::is_none")]\n' defi += f" pub {e.name.normalized()}: Option<{typename}>,\n" return defi, decl @@ -223,7 +223,7 @@ def rename_if_necessary(original, name): if str(original) != str(name): return f" #[serde(rename = \"{original}\")]\n" else: - return f"" + return "" def gen_array(a, meta, override=None): @@ -390,7 +390,7 @@ def generate_response_trait_impl(self, method: Method): def generate_enums(self, service: Service): """The Request and Response enums serve as parsing primitives.""" self.write( - f"""\ + """\ use serde::{{Deserialize, Serialize}}; #[derive(Clone, Debug, Serialize, Deserialize)] @@ -398,6 +398,7 @@ def generate_enums(self, service: Service): #[serde(rename_all = "lowercase")] pub enum Request {{ """ + .replace("{{", "{").replace("}}", "}"), ) for method in service.methods: @@ -410,13 +411,13 @@ def generate_enums(self, service: Service): ) self.write( - f"""\ - }} + """\ + } #[derive(Clone, Debug, Serialize, Deserialize)] #[serde(tag = "method", content = "result")] #[serde(rename_all = "lowercase")] - pub enum Response {{ + pub enum Response { """ ) @@ -430,8 +431,8 @@ def generate_enums(self, service: Service): ) self.write( - f"""\ - }} + """\ + } """ ) diff --git a/contrib/pyln-grpc-proto/pyln/grpc/node_pb2_grpc.py b/contrib/pyln-grpc-proto/pyln/grpc/node_pb2_grpc.py index 2f86e90ff91f..e72fb4e48f44 100644 --- a/contrib/pyln-grpc-proto/pyln/grpc/node_pb2_grpc.py +++ b/contrib/pyln-grpc-proto/pyln/grpc/node_pb2_grpc.py @@ -18,7 +18,7 @@ if _version_not_supported: raise RuntimeError( f'The grpc package installed is at version {GRPC_VERSION},' - + f' but the generated code in node_pb2_grpc.py depends on' + + ' but the generated code in node_pb2_grpc.py depends on' + f' grpcio>={GRPC_GENERATED_VERSION}.' + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' diff --git a/tests/autogenerate-rpc-examples.py b/tests/autogenerate-rpc-examples.py index 698fc4005095..8143bccf57a9 100644 --- a/tests/autogenerate-rpc-examples.py +++ b/tests/autogenerate-rpc-examples.py @@ -391,7 +391,7 @@ def update_examples_in_schema_files(): with open(TEMP_EXAMPLES_FILE, 'w+', encoding='utf-8') as file: json.dump({'new_values_list': NEW_VALUES_LIST, 'replace_response_values': REPLACE_RESPONSE_VALUES[4:], 'examples_json': EXAMPLES_JSON, 'updated_examples_json': updated_examples}, file, indent=2, ensure_ascii=False) - logger.info(f'Updated All Examples in Schema Files!') + logger.info('Updated All Examples in Schema Files!') return None @@ -1138,12 +1138,12 @@ def generate_wait_examples(l1, l2, bitcoind, executor): if curr_blockheight < 130: bitcoind.generate_block(130 - curr_blockheight) sync_blockheight(bitcoind, [l2]) - update_example(node=l2, method='waitblockheight', params={'blockheight': 126}, description=[f'This will return immediately since the current blockheight exceeds the requested waitblockheight.']) + update_example(node=l2, method='waitblockheight', params={'blockheight': 126}, description=['This will return immediately since the current blockheight exceeds the requested waitblockheight.']) wbh = executor.submit(l2.rpc.waitblockheight, curr_blockheight + 1, 600) bitcoind.generate_block(1) sync_blockheight(bitcoind, [l2]) wbhres = wbh.result(5) - update_example(node=l2, method='waitblockheight', params={'blockheight': curr_blockheight + 1, 'timeout': 600}, response=wbhres, description=[f'This will return after the next block is mined because requested waitblockheight is one block higher than the current blockheight.']) + update_example(node=l2, method='waitblockheight', params={'blockheight': curr_blockheight + 1, 'timeout': 600}, response=wbhres, description=['This will return after the next block is mined because requested waitblockheight is one block higher than the current blockheight.']) REPLACE_RESPONSE_VALUES.extend([ {'data_keys': ['payment_hash'], 'original_value': wspc_res['details']['payment_hash'], 'new_value': NEW_VALUES_LIST['payment_hash_wspc_1']}, {'data_keys': ['paid_at'], 'original_value': waires['paid_at'], 'new_value': NEW_VALUES_LIST['time_at_850']}, @@ -1257,7 +1257,7 @@ def generate_utils_examples(l1, l2, l3, l4, l5, l6, c23_2, c34_2, inv_l11, inv_l # SQL update_example(node=l1, method='sql', params={'query': 'SELECT id FROM peers'}, description=['A simple peers selection query:']) - update_example(node=l1, method='sql', params=[f"SELECT label, description, status FROM invoices WHERE label='label inv_l12'"], description=["A statement containing `=` needs `-o` in shell:"]) + update_example(node=l1, method='sql', params=["SELECT label, description, status FROM invoices WHERE label='label inv_l12'"], description=["A statement containing `=` needs `-o` in shell:"]) sql_res3 = l1.rpc.sql(f"SELECT nodeid FROM nodes WHERE nodeid != x'{l3.info['id']}'") update_example(node=l1, method='sql', params=[f"SELECT nodeid FROM nodes WHERE nodeid != x'{NEW_VALUES_LIST['l3_id']}'"], description=['If you want to get specific nodeid values from the nodes table:'], response=sql_res3) sql_res4 = l1.rpc.sql(f"SELECT nodeid FROM nodes WHERE nodeid IN (x'{l1.info['id']}', x'{l3.info['id']}')") @@ -1524,7 +1524,7 @@ def generate_channels_examples(node_factory, bitcoind, l1, l3, l4, l5): utxo = f"{outputs[0]['txid']}:{outputs[0]['output']}" c41res = update_example(node=l4, method='fundchannel', params={'id': l1.info['id'], 'amount': 'all', 'feerate': 'normal', 'push_msat': 100000, 'utxos': [utxo]}, - description=[f'This example shows how to to open new channel with peer 1 from one whole utxo (you can use **listfunds** command to get txid and vout):']) + description=['This example shows how to to open new channel with peer 1 from one whole utxo (you can use **listfunds** command to get txid and vout):']) # Close newly funded channels to bring the setup back to initial state l3.rpc.close(c35res['channel_id']) l4.rpc.close(c41res['channel_id']) @@ -1593,7 +1593,7 @@ def generate_channels_examples(node_factory, bitcoind, l1, l3, l4, l5): ] example_destinations_2 = [ { - 'id': f'fakenodeid' + ('03' * 28) + '@127.0.0.1:19736', + 'id': 'fakenodeid' + ('03' * 28) + '@127.0.0.1:19736', 'amount': 50000 }, { @@ -1696,7 +1696,7 @@ def generate_autoclean_delete_examples(l1, l2, l3, l4, l5, c12, c23): try: logger.info('Auto-clean and Delete Start...') l2.rpc.close(l5.info['id']) - dfc_res1 = update_example(node=l2, method='dev-forget-channel', params={'id': l5.info['id']}, description=[f'Forget a channel by peer pubkey when only one channel exists with the peer:']) + dfc_res1 = update_example(node=l2, method='dev-forget-channel', params={'id': l5.info['id']}, description=['Forget a channel by peer pubkey when only one channel exists with the peer:']) # Create invoices for delpay and delinvoice examples inv_l35 = l3.rpc.invoice('50000sat', 'lbl_l35', 'l35 description') @@ -1741,7 +1741,7 @@ def generate_autoclean_delete_examples(l1, l2, l3, l4, l5, c12, c23): update_example(node=l2, method='delforward', params={'in_channel': c12, 'in_htlc_id': local_failed_forwards[0]['in_htlc_id'], 'status': 'local_failed'}) if len(failed_forwards) > 0 and 'in_htlc_id' in failed_forwards[0]: update_example(node=l2, method='delforward', params={'in_channel': c12, 'in_htlc_id': failed_forwards[0]['in_htlc_id'], 'status': 'failed'}) - dfc_res2 = update_example(node=l2, method='dev-forget-channel', params={'id': l3.info['id'], 'short_channel_id': c23, 'force': True}, description=[f'Forget a channel by short channel id when peer has multiple channels:']) + dfc_res2 = update_example(node=l2, method='dev-forget-channel', params={'id': l3.info['id'], 'short_channel_id': c23, 'force': True}, description=['Forget a channel by short channel id when peer has multiple channels:']) # Autoclean update_example(node=l2, method='autoclean-once', params=['failedpays', 1]) diff --git a/tests/test_closing.py b/tests/test_closing.py index 5c4a17acc5f4..721549a485b5 100644 --- a/tests/test_closing.py +++ b/tests/test_closing.py @@ -4076,7 +4076,7 @@ def test_peer_anchor_push(node_factory, bitcoind, executor, chainparams): assert len(bitcoind.rpc.getrawmempool()) == 2 # Feerate tops out at +1, so this is the same. This time we mine it! - l2.daemon.wait_for_log(fr"Worth fee [0-9]*sat for remote commit tx to get 100000000msat at block 125 \(\+1\) at feerate 15000perkw") + l2.daemon.wait_for_log(r"Worth fee [0-9]*sat for remote commit tx to get 100000000msat at block 125 \(\+1\) at feerate 15000perkw") l2.daemon.wait_for_log("sendrawtx exit 0") bitcoind.generate_block(1, needfeerate=15000) diff --git a/tests/test_connection.py b/tests/test_connection.py index dece3e1a87d2..33119207a4da 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -4743,7 +4743,7 @@ def test_networkevents(node_factory, executor): 'peer_id': l2.info['id'], 'type': 'connect_fail', 'connect_attempted': True, - 'reason': f'All addresses failed: 127.0.0.1:1: Connection establishment: Connection refused. '}] + 'reason': 'All addresses failed: 127.0.0.1:1: Connection establishment: Connection refused. '}] # Connect failed because unreachable with pytest.raises(RpcError, match="Connection establishment: Connection timed out."): @@ -4756,7 +4756,7 @@ def test_networkevents(node_factory, executor): 'peer_id': l2.info['id'], 'type': 'connect_fail', 'connect_attempted': True, - 'reason': f'All addresses failed: 1.1.1.1:8081: Connection establishment: Connection timed out. '}] + 'reason': 'All addresses failed: 1.1.1.1:8081: Connection establishment: Connection timed out. '}] # Connect failed because it doesn't advertize any addresses. with pytest.raises(RpcError, match="Unable to connect, no address known for peer"): diff --git a/tests/test_misc.py b/tests/test_misc.py index e53b283ca116..f9228931acba 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -2986,9 +2986,9 @@ def test_custommsg_triggers_notification(node_factory): # TODO: Check if the peer_id and payload matches peer_id = l2.info["id"] - l1.daemon.wait_for_log(f"Received a custommsg with data") + l1.daemon.wait_for_log("Received a custommsg with data") l1.daemon.wait_for_log(f"peer_id={peer_id}") - l1.daemon.wait_for_log(f"payload=77770012") + l1.daemon.wait_for_log("payload=77770012") def test_makesecret(node_factory): diff --git a/tests/test_opening.py b/tests/test_opening.py index 13863df45b92..d46961dc9592 100644 --- a/tests/test_opening.py +++ b/tests/test_opening.py @@ -2921,7 +2921,7 @@ def test_zeroconf_withhold(node_factory, bitcoind, stay_withheld, mutual_close): funds = l1.rpc.listfunds() for utxo in funds['outputs']: assert utxo['status'] == 'confirmed', \ - f"UTXO still reserved after withheld close" + "UTXO still reserved after withheld close" else: if mutual_close: wait_for(lambda: only_one(l1.rpc.listpeerchannels()['channels'])['state'] == 'CLOSINGD_COMPLETE') diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 428864c43038..9a2d5f1d97df 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -4405,8 +4405,8 @@ def test_all_subscription(node_factory, directory): assert l2.daemon.is_in_log(f'.*test_libplugin: all: {notstr}.*') # shutdown and connect are subscribed before the wildcard, so is handled by that handler - assert not l2.daemon.is_in_log(f'.*test_libplugin: all: shutdown.*') - assert not l2.daemon.is_in_log(f'.*test_libplugin: all: connect.*') + assert not l2.daemon.is_in_log('.*test_libplugin: all: shutdown.*') + assert not l2.daemon.is_in_log('.*test_libplugin: all: connect.*') def test_dynamic_option_python_plugin(node_factory): @@ -4516,7 +4516,7 @@ def test_sql_crash(node_factory, bitcoind): l1.rpc.fundchannel_start(l2.info['id'], '10000000sat') assert 'updates' not in only_one(l1.rpc.listpeerchannels()['channels']) - l1.rpc.sql(f"SELECT * FROM peerchannels;") + l1.rpc.sql("SELECT * FROM peerchannels;") def test_sql_parallel(node_factory, executor): @@ -4837,7 +4837,7 @@ def zero_timestamps(obj): l1.rpc.pay(inv1['bolt11']) # It gets a channel hint update notification - line = l1.daemon.wait_for_log(f"plugin-all_notifications.py: notification channel_hint_update: ") + line = l1.daemon.wait_for_log("plugin-all_notifications.py: notification channel_hint_update: ") dict_str = line.split("notification channel_hint_update: ", 1)[1] data = zero_timestamps(ast.literal_eval(dict_str)) @@ -4855,7 +4855,7 @@ def zero_timestamps(obj): assert data == channel_hint_update # It gets a success notification - line = l1.daemon.wait_for_log(f"plugin-all_notifications.py: notification pay_success: ") + line = l1.daemon.wait_for_log("plugin-all_notifications.py: notification pay_success: ") dict_str = line.split("notification pay_success: ", 1)[1] data = ast.literal_eval(dict_str) success_core = {'payment_hash': inv1['payment_hash'], @@ -4872,7 +4872,7 @@ def zero_timestamps(obj): with pytest.raises(RpcError, match="WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS"): l1.rpc.pay(inv2['bolt11']) - line = l1.daemon.wait_for_log(f"plugin-all_notifications.py: notification pay_failure: ") + line = l1.daemon.wait_for_log("plugin-all_notifications.py: notification pay_failure: ") dict_str = line.split("notification pay_failure: ", 1)[1] data = ast.literal_eval(dict_str) failure_core = {'payment_hash': inv2['payment_hash'], 'bolt11': inv2['bolt11'], 'error': {'message': 'failed: WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS (reply from remote)'}} diff --git a/tests/test_reckless.py b/tests/test_reckless.py index d294b79a50ef..2cbd7190e65d 100644 --- a/tests/test_reckless.py +++ b/tests/test_reckless.py @@ -88,7 +88,7 @@ def canned_github_server(directory): yield # Delete requirements.txt from the testplugpass directory with open(requirements_file_path, 'w') as f: - f.write(f"pyln-client\n\n") + f.write("pyln-client\n\n") server.terminate() @@ -100,7 +100,7 @@ def __init__(self, process, returncode, stdout, stderr): self.stderr = stderr def __repr__(self): - return f'self.returncode, self.stdout, self.stderr' + return 'self.returncode, self.stdout, self.stderr' def search_stdout(self, regex): """return the matching regex line from reckless output.""" diff --git a/tests/test_wallet.py b/tests/test_wallet.py index 5be686d11ef4..2dc8d10e7d41 100644 --- a/tests/test_wallet.py +++ b/tests/test_wallet.py @@ -1854,7 +1854,7 @@ def test_bip86_deterministic_addresses(node_factory): assert addr1_1 == addr2_1, f"Addresses for index 1 don't match: {addr1_1} != {addr2_1}" # Addresses should be different for different indices - assert addr1_0 != addr1_1, f"Addresses for different indices should be different" + assert addr1_0 != addr1_1, "Addresses for different indices should be different" @unittest.skipIf(TEST_NETWORK != 'regtest', "BIP86 tests are regtest-specific") @@ -2776,7 +2776,7 @@ def test_rescan_missing_utxo(node_factory, bitcoind): l3.daemon.wait_for_log("Scanning for missed UTXOs finished") # Found it? - assert only_one(l3.db_query(f"SELECT spendheight as spendheight FROM utxoset WHERE blockheight=103 AND txindex=1"))['spendheight'] == 129 + assert only_one(l3.db_query("SELECT spendheight as spendheight FROM utxoset WHERE blockheight=103 AND txindex=1"))['spendheight'] == 129 # Restart will NOT invoke scan. oldstart_l3 = l3.daemon.logsearch_start diff --git a/tests/test_xpay.py b/tests/test_xpay.py index c5ad9160600b..3e542545fc12 100644 --- a/tests/test_xpay.py +++ b/tests/test_xpay.py @@ -616,7 +616,7 @@ def test_xpay_no_mpp(node_factory, chainparams): f"currency={chainparams['bip173_prefix']}", f"p={no_mpp['payment_hash']}", f"s={no_mpp['payment_secret']}", - f"d=Paying l3 without mpp", + "d=Paying l3 without mpp", f"amount={AMOUNT}"]).decode('utf-8').strip() # This should not mpp!