From 38dc4caa9ca193a987aa5d277ceeee3e63dd0c0a Mon Sep 17 00:00:00 2001 From: everoddandeven Date: Sun, 29 Nov 2026 00:04:05 +0100 Subject: [PATCH 1/5] ci: find the typos before a possessive and report a clean spelling check --- .codespellrc | 2 ++ bin/check_spelling.sh | 2 ++ src/monero/monero_wallet.pyi | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.codespellrc b/.codespellrc index 071e75c0..f86d81b6 100644 --- a/.codespellrc +++ b/.codespellrc @@ -2,5 +2,7 @@ [codespell] # the words that are not typos: "statics" are the static variables of C++ ignore-words-list = statics +# the possessive 's is not a part of the word: a typo before it is found, and "doesn't" stays one word +regex = [\w\-]+(?:['’](?!s\b)[\w\-]+)* # what is not text skip = *.png,*.ico,*.svg,*.pdf,*.drawio diff --git a/bin/check_spelling.sh b/bin/check_spelling.sh index 6b7d1abd..4cf83191 100755 --- a/bin/check_spelling.sh +++ b/bin/check_spelling.sh @@ -25,3 +25,5 @@ fi # the files of git, without the submodules, whose entries are folders, and without what the build and the tests leave around cd "$root" git ls-files -z | grep -zv '^external/' | xargs -0 "$venv/bin/codespell" "$@" +# codespell says nothing when it finds none +echo "codespell $version: no typos" diff --git a/src/monero/monero_wallet.pyi b/src/monero/monero_wallet.pyi index ba0c9496..e7cc6abb 100644 --- a/src/monero/monero_wallet.pyi +++ b/src/monero/monero_wallet.pyi @@ -450,8 +450,8 @@ class MoneroWallet: """ Get an integrated address from a standard address and a payment id. - :param str standard_address: is the integrated addresse's standard address (defaults to wallet's primary address). - :param str payment_id: is the integrated addresse's payment id (defaults to randomly generating new payment id). + :param str standard_address: is the integrated address's standard address (defaults to wallet's primary address). + :param str payment_id: is the integrated address's payment id (defaults to randomly generating new payment id). :returns MoneroIntegratedAddress: the integrated address. """ ... From 5e4485e30c82542a6a92b06c43b05f6588cafb76 Mon Sep 17 00:00:00 2001 From: everoddandeven Date: Sun, 29 Nov 2026 00:19:42 +0100 Subject: [PATCH 2/5] docs: fix the typos that cspell finds --- src/monero/monero_daemon.pyi | 2 +- src/monero/monero_daemon_info.pyi | 2 +- src/monero/monero_output_query.pyi | 2 +- src/monero/monero_rpc_connection.pyi | 2 +- src/monero/monero_tx.pyi | 2 +- src/monero/monero_tx_config.pyi | 2 +- src/monero/monero_tx_set.pyi | 2 +- src/monero/monero_wallet.pyi | 2 +- tests/utils/sync_seed_tester.py | 2 +- tests/utils/tx_wallet_tester.py | 2 +- tests/utils/txs_structure_tester.py | 2 +- tests/utils/wallet_sweeper.py | 2 +- tests/utils/wallet_txs_utils.py | 2 +- tests/utils/wallet_utils.py | 6 +++--- tests/wallet/test_accounts.py | 2 +- tests/wallet/test_proofs.py | 6 +++--- tests/wallet/test_transfers.py | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/monero/monero_daemon.pyi b/src/monero/monero_daemon.pyi index 7dd75dee..c6baef6d 100644 --- a/src/monero/monero_daemon.pyi +++ b/src/monero/monero_daemon.pyi @@ -361,7 +361,7 @@ class MoneroDaemon: :param int height: is the height to start computing the miner sum. :param int num_blocks: are the number of blocks to include in the sum. - :returns MoneroMinerTxSum: the sum emission and fees since the geneis block. + :returns MoneroMinerTxSum: the sum emission and fees since the genesis block. """ ... diff --git a/src/monero/monero_daemon_info.pyi b/src/monero/monero_daemon_info.pyi index dabe6a88..aba544c9 100644 --- a/src/monero/monero_daemon_info.pyi +++ b/src/monero/monero_daemon_info.pyi @@ -53,7 +53,7 @@ class MoneroDaemonInfo(MoneroRpcPaymentInfo): num_offline_peers: int | None """Number of peers that are marked as not reachable on the network.""" num_online_peers: int | None - """Number of peers that are marked as reacheble on the network.""" + """Number of peers that are marked as reachable on the network.""" num_outgoing_connections: int | None """Number of peers that you are connected to and getting information from.""" num_rpc_connections: int | None diff --git a/src/monero/monero_output_query.pyi b/src/monero/monero_output_query.pyi index 931c4788..4410f097 100644 --- a/src/monero/monero_output_query.pyi +++ b/src/monero/monero_output_query.pyi @@ -17,7 +17,7 @@ class MoneroOutputQuery(MoneroOutputWallet): min_amount: int | None """Filter outputs below this amount.""" subaddress_indices: list[int] - """Subadress indices to select (empty for all).""" + """Subaddress indices to select (empty for all).""" @property def tx_query(self) -> MoneroTxQuery | None: diff --git a/src/monero/monero_rpc_connection.pyi b/src/monero/monero_rpc_connection.pyi index af701fa0..85af9776 100644 --- a/src/monero/monero_rpc_connection.pyi +++ b/src/monero/monero_rpc_connection.pyi @@ -96,7 +96,7 @@ class MoneroRpcConnection(SerializableStruct): :param str password: password used for authentication. :param str proxy_uri: proxy uri. :param str zmq_uri: ZMQ uri. - :param int priority: priorioty of the connection. + :param int priority: priority of the connection. :param int|None timeout_ms: connection timeout in milliseconds. """ ... diff --git a/src/monero/monero_tx.pyi b/src/monero/monero_tx.pyi index 577f6012..a27369c5 100644 --- a/src/monero/monero_tx.pyi +++ b/src/monero/monero_tx.pyi @@ -71,7 +71,7 @@ class MoneroTx(SerializableStruct): rct_signatures: str | None """Signatures used in ring signature to hide the true origin of the transaction.""" received_timestamp: int | None - """Unix time at chich the transaction has been received.""" + """Unix time at which the transaction has been received.""" relay: bool | None """States if this transaction should be relayed (`True`) or not (`False`).""" ring_size: int | None diff --git a/src/monero/monero_tx_config.pyi b/src/monero/monero_tx_config.pyi index 88d63366..703c3d83 100644 --- a/src/monero/monero_tx_config.pyi +++ b/src/monero/monero_tx_config.pyi @@ -40,7 +40,7 @@ class MoneroTxConfig(SerializableStruct): subtract_fee_from: list[int] """Subtract fee from outputs.""" sweep_each_subaddress: bool | None - """Sweep each wallet subbaddress.""" + """Sweep each wallet subaddress.""" @staticmethod def deserialize(config_json: str) -> MoneroTxConfig: """ diff --git a/src/monero/monero_tx_set.pyi b/src/monero/monero_tx_set.pyi index 9d0f30e1..2598b922 100644 --- a/src/monero/monero_tx_set.pyi +++ b/src/monero/monero_tx_set.pyi @@ -35,7 +35,7 @@ class MoneroTxSet(SerializableStruct): Deserialize a Monero transaction set from a JSON string. :param str tx_set_json: tx set as JSON string. - :returns MoneroTxSet: The deseriliazed transaction set. + :returns MoneroTxSet: The deserialized transaction set. """ ... def __init__(self) -> None: diff --git a/src/monero/monero_wallet.pyi b/src/monero/monero_wallet.pyi index e7cc6abb..b5313996 100644 --- a/src/monero/monero_wallet.pyi +++ b/src/monero/monero_wallet.pyi @@ -727,7 +727,7 @@ class MoneroWallet: :param int account_idx: is the index of the account to get transfers from. :param int subaddress_idx: is the index of the subaddress to get transfers from. - :returns list[MoneroTransfer]: transfers to/from the accsubaddressount. + :returns list[MoneroTransfer]: transfers to/from the account. """ ... def get_tx_key(self, tx_hash: str) -> str: diff --git a/tests/utils/sync_seed_tester.py b/tests/utils/sync_seed_tester.py index 137167b2..b7c1a664 100644 --- a/tests/utils/sync_seed_tester.py +++ b/tests/utils/sync_seed_tester.py @@ -54,7 +54,7 @@ def __init__( :param Callable[[MoneroWalletConfig, bool], MoneroWalletFull] create_wallet: wallet creation function. :param int | None start_height: blockchain start height. :param int | None restore_height: wallet restore height. - :param bool skip_gt_comparison: Skip wallet ground thruth verification (default `False`). + :param bool skip_gt_comparison: Skip wallet ground truth verification (default `False`). :param bool test_post_sync_notifications: Test wallet post-sync notifications (default `False`). """ self.daemon = daemon diff --git a/tests/utils/tx_wallet_tester.py b/tests/utils/tx_wallet_tester.py index f296d7fa..3105915d 100644 --- a/tests/utils/tx_wallet_tester.py +++ b/tests/utils/tx_wallet_tester.py @@ -105,7 +105,7 @@ def _test_pool_status(self) -> None: # these should be initialized unless a response from sending # TODO re-enable when received timestamp returned in wallet rpc - #if cself.self.tx.is_send_response: + #if self.tx.is_send_response: # assert self.tx.received_timestamp > 0 else: assert self.tx.last_relayed_timestamp is None diff --git a/tests/utils/txs_structure_tester.py b/tests/utils/txs_structure_tester.py index c9d455bb..91543d3b 100644 --- a/tests/utils/txs_structure_tester.py +++ b/tests/utils/txs_structure_tester.py @@ -90,7 +90,7 @@ def _test_block_txs_order(self, tx: MoneroTx, block: MoneroBlock, index: int) -> # verify tx order is self-consistent with blocks unless txs manually re-ordered by querying by hash assert other is tx else: - # TODO regtest wallet2 has inconsinstent txs order between calls + # TODO regtest wallet2 has inconsistent txs order between calls assert other in block.txs, "Tx not found in block" def _test_txs_order(self) -> None: diff --git a/tests/utils/wallet_sweeper.py b/tests/utils/wallet_sweeper.py index 6280faf4..fbc20526 100644 --- a/tests/utils/wallet_sweeper.py +++ b/tests/utils/wallet_sweeper.py @@ -17,7 +17,7 @@ class WalletSweeper: _wallet: MoneroWallet """Test wallet instance to sweep funds from.""" _sweep_each_subaddress: bool | None - """Indicates if each subaddress must be sweeped out.""" + """Indicates if each subaddress must be swept out.""" def __init__(self, wallet: MoneroWallet, sweep_each_subaddress: bool | None) -> None: """Initialize a new wallet sweeper. diff --git a/tests/utils/wallet_txs_utils.py b/tests/utils/wallet_txs_utils.py index 024691e5..bc3cbf6a 100644 --- a/tests/utils/wallet_txs_utils.py +++ b/tests/utils/wallet_txs_utils.py @@ -91,7 +91,7 @@ def get_unrelayed_tx(cls, wallet: MoneroWallet, account_idx: int) -> MoneroTxWal :param MoneroWallet wallet: wallet to get unrelayed tx from. :param int account_idx: wallet account index to get unrelayed tx from. - :returns MoneroTxWallet: unrealyed wallet tx. + :returns MoneroTxWallet: unrelayed wallet tx. """ # TODO monero-project assert account_idx > 0, "Txs sent from/to same account are not properly synced from the pool" diff --git a/tests/utils/wallet_utils.py b/tests/utils/wallet_utils.py index 506c34c2..f1de9b4a 100644 --- a/tests/utils/wallet_utils.py +++ b/tests/utils/wallet_utils.py @@ -114,14 +114,14 @@ def test_account(cls, account: Optional[MoneroAccount], network_type: MoneroNetw if full: GenUtils.test_unsigned_big_integer(account.balance) GenUtils.test_unsigned_big_integer(account.unlocked_balance) - num_subadresses: int = len(account.subaddresses) + num_subaddresses: int = len(account.subaddresses) # if given, test subaddresses and that their balances add up to account balances - if num_subadresses > 0: + if num_subaddresses > 0: balance: int = 0 unlocked_balance: int = 0 - for i in range(num_subadresses): + for i in range(num_subaddresses): cls.test_subaddress(account.subaddresses[i]) assert account.index == account.subaddresses[i].account_index assert i == account.subaddresses[i].index diff --git a/tests/wallet/test_accounts.py b/tests/wallet/test_accounts.py index 8a14a39e..dc8f8295 100644 --- a/tests/wallet/test_accounts.py +++ b/tests/wallet/test_accounts.py @@ -156,7 +156,7 @@ def test_set_account_label(self, wallet: MoneroWallet) -> None: wallet.set_account_label(1, label) assert label == wallet.get_subaddress(1, 0).label - # Can get subaddresses at a aspecified account index + # Can get subaddresses at a specified account index @pytest.mark.skipif(TestUtils.TEST_NON_RELAYS is False, reason="TEST_NON_RELAYS disabled") def test_get_subaddresses(self, wallet: MoneroWallet) -> None: accounts: list[MoneroAccount] = wallet.get_accounts() diff --git a/tests/wallet/test_proofs.py b/tests/wallet/test_proofs.py index 0a268fad..8579bdd8 100644 --- a/tests/wallet/test_proofs.py +++ b/tests/wallet/test_proofs.py @@ -185,7 +185,7 @@ def test_check_tx_proof(self, wallet: MoneroWallet) -> None: assert str(e) == "Must provide signature to check tx proof" # Can prove a spend using a generated signature and no destination public address - @pytest.mark.skipif(TestUtils.TEST_NON_RELAYS is False, reason="TEST_NON_RELAYS disablde") + @pytest.mark.skipif(TestUtils.TEST_NON_RELAYS is False, reason="TEST_NON_RELAYS disabled") def test_check_spend_proof(self, wallet: MoneroWallet) -> None: # get random confirmed outgoing txs query: MoneroTxQuery = MoneroTxQuery() @@ -235,7 +235,7 @@ def test_check_spend_proof(self, wallet: MoneroWallet) -> None: assert result is False # Can prove reserves in the wallet - @pytest.mark.skipif(TestUtils.TEST_NON_RELAYS is False, reason="TEST_NON_RELAYS disablde") + @pytest.mark.skipif(TestUtils.TEST_NON_RELAYS is False, reason="TEST_NON_RELAYS disabled") def test_get_reserve_proof_wallet(self, wallet: MoneroWallet) -> None: # get proof of entire wallet signature: str = wallet.get_reserve_proof_wallet("Test message") @@ -275,7 +275,7 @@ def test_get_reserve_proof_wallet(self, wallet: MoneroWallet) -> None: WalletErrorUtils.test_signature_header_error(exc_info.value) # Can prove reserves in an account - @pytest.mark.skipif(TestUtils.TEST_NON_RELAYS is False, reason="TEST_NON_RELAYS disablde") + @pytest.mark.skipif(TestUtils.TEST_NON_RELAYS is False, reason="TEST_NON_RELAYS disabled") def test_get_reserve_proof_account(self, wallet: MoneroWallet) -> None: # test proofs of accounts num_non_zero_tests: int = 0 diff --git a/tests/wallet/test_transfers.py b/tests/wallet/test_transfers.py index 4877fe1e..9863a71b 100644 --- a/tests/wallet/test_transfers.py +++ b/tests/wallet/test_transfers.py @@ -232,7 +232,7 @@ def test_get_transfers_with_query(self, wallet: MoneroWallet) -> None: assert transfer.tx.is_outgoing is True assert transfer.tx.outgoing_transfer is None - # get incoming transfers to a spefici address + # get incoming transfers to a specific address subaddress: str = wallet.get_address(1, 0) query = MoneroTransferQuery() query.incoming = True From b9292837b6e618a998b0d712448d9cd9ded6812e Mon Sep 17 00:00:00 2001 From: everoddandeven Date: Sun, 29 Nov 2026 00:42:58 +0100 Subject: [PATCH 3/5] vscode: add the words of the project to the dictionary of the spell checker --- .vscode/settings.json | 82 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 21974c21..39ed0649 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -76,5 +76,85 @@ // the buttons of the status bar are of .vscode/extensions/status-bar-buttons: who has the extension Tasks installed too would see a // button for each task without this - "tasks.statusbar.default.hide": true + "tasks.statusbar.default.hide": true, + "cSpell.words": [ + "annot", + "autoremove", + "backlink", + "badpassword", + "banhammer", + "beefdead", + "behaviour", + "bitmonero", + "blobdata", + "Blockheight", + "Cryptonote", + "decontextualize", + "decontextualized", + "dedup", + "dedups", + "dests", + "DNSSEC", + "elts", + "fakechain", + "feba", + "generateblocks", + "getmonero", + "getrusage", + "histo", + "idxs", + "Keccak", + "kwonlyargs", + "Libmonero", + "maxrss", + "metadatas", + "mkdocs", + "modifyitems", + "Monero", + "monerod", + "msgwriter", + "multisign", + "multisignature", + "myval", + "NDEBUG", + "nettype", + "nodeid", + "notanaddress", + "nothex", + "ohhai", + "OMZG", + "posonlyargs", + "pubkeys", + "pytest", + "rapidjson", + "REGTEST", + "repointed", + "repoints", + "repr", + "rerunfailures", + "rescan", + "rescans", + "ringdb", + "rockstar", + "RUSAGE", + "stagenet", + "stubgen", + "subaddr", + "Subaddress", + "subaddresses", + "subtractfeefrom", + "summ", + "supersecretpassword", + "sweepable", + "txes", + "unfound", + "unmixable", + "unrelayed", + "vout", + "wijqwnn", + "wipeable", + "woodser", + "wrongpass", + "wronguser" + ] } From 92b86bdb051d0121f076d2b059f8af594c075417 Mon Sep 17 00:00:00 2001 From: everoddandeven Date: Sun, 29 Nov 2026 00:53:22 +0100 Subject: [PATCH 4/5] vscode: add code spell checker to suggested extensions --- .vscode/extensions.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index c75c7de4..b9e9a0e9 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -17,6 +17,7 @@ "compulim.indent4to2", "kevinrose.vsc-python-indent", "shardulm94.trailing-spaces", - "tamasfe.even-better-toml" + "tamasfe.even-better-toml", + "streetsidesoftware.code-spell-checker" ] } From 4b04260bb08e239e9bbec583b48cb1c861dd8c03 Mon Sep 17 00:00:00 2001 From: everoddandeven Date: Sun, 29 Nov 2026 15:28:30 +0100 Subject: [PATCH 5/5] vscode: update spell checker dictionary and add readonly setting for submodules --- .vscode/settings.json | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 39ed0649..8e4786e3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -74,11 +74,16 @@ "files.trimTrailingWhitespace": true, "files.insertFinalNewline": true, + // the submodules are read only in the editor, which would change their files when it saves them: monero-cpp is changed in its own clone + "files.readonlyInclude": { "external/**": true }, + // the buttons of the status bar are of .vscode/extensions/status-bar-buttons: who has the extension Tasks installed too would see a // button for each task without this "tasks.statusbar.default.hide": true, "cSpell.words": [ "annot", + "armhf", + "armv", "autoremove", "backlink", "badpassword", @@ -87,25 +92,44 @@ "behaviour", "bitmonero", "blobdata", - "Blockheight", + "buildflags", + "buildopts", + "buildpackage", + "CFLAGS", + "conftest", + "cpus", "Cryptonote", + "dbgsym", + "DCMAKE", "decontextualize", "decontextualized", "dedup", "dedups", + "DESTDIR", "dests", "DNSSEC", + "dpkg", "elts", "fakechain", + "FCFLAGS", "feba", + "flto", + "fprofile", + "ftime", + "gcno", "generateblocks", "getmonero", "getrusage", + "graphviz", "histo", "idxs", + "INTERPROCEDURAL", "Keccak", "kwonlyargs", "Libmonero", + "libp", + "LTRANS", + "Makefiles", "maxrss", "metadatas", "mkdocs", @@ -113,6 +137,7 @@ "Monero", "monerod", "msgwriter", + "MSYS", "multisign", "multisignature", "myval", @@ -121,11 +146,15 @@ "nodeid", "notanaddress", "nothex", + "OBJCFLAGS", + "OBJCXXFLAGS", "ohhai", "OMZG", "posonlyargs", "pubkeys", + "pybind", "pytest", + "qttools", "rapidjson", "REGTEST", "repointed", @@ -137,6 +166,8 @@ "ringdb", "rockstar", "RUSAGE", + "scikit", + "shlibdeps", "stagenet", "stubgen", "subaddr", @@ -146,6 +177,7 @@ "summ", "supersecretpassword", "sweepable", + "trixie", "txes", "unfound", "unmixable",