From 3ff5e532a64a4be836aed7e5c2b378ea192f692d Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sun, 25 Oct 2026 10:11:09 +0000 Subject: [PATCH] whitespace --- mmgen/fileutil.py | 3 +-- mmgen/main_msg.py | 3 +-- mmgen/passwdlist.py | 3 +-- mmgen/proto/xmr/rpc.py | 2 +- mmgen/tx/file.py | 5 +++-- mmgen/tx/new.py | 3 +-- mmgen/util2.py | 3 +-- setup.py | 3 +-- test/cmdtest_d/httpd/thornode/swap.py | 3 +-- test/cmdtest_d/include/runner.py | 3 +-- test/cmdtest_d/ref.py | 6 ++---- test/cmdtest_d/tool.py | 6 ++---- test/cmdtest_d/xmrwallet.py | 3 +-- test/modtest_d/devtools.py | 6 ++---- test/objattrtest_d/btc_mainnet.py | 3 +-- test/tooltest.py | 3 +-- 16 files changed, 21 insertions(+), 37 deletions(-) diff --git a/mmgen/fileutil.py b/mmgen/fileutil.py index b6ea2a31..b9ebc9f5 100644 --- a/mmgen/fileutil.py +++ b/mmgen/fileutil.py @@ -30,8 +30,7 @@ from .util import ( is_utf8, capfirst, make_full_path, - strip_comments, -) + strip_comments) def check_or_create_dir(cfg, path): try: diff --git a/mmgen/main_msg.py b/mmgen/main_msg.py index 69787bd7..61a123e8 100644 --- a/mmgen/main_msg.py +++ b/mmgen/main_msg.py @@ -19,8 +19,7 @@ from .msg import ( UnsignedMsg, SignedMsg, SignedOnlineMsg, - ExportedMsgSigs, -) + ExportedMsgSigs) class MsgOps: ops = ('create', 'sign', 'verify') diff --git a/mmgen/passwdlist.py b/mmgen/passwdlist.py index 8a9c487d..0144b26a 100644 --- a/mmgen/passwdlist.py +++ b/mmgen/passwdlist.py @@ -28,8 +28,7 @@ from .addrlist import ( AddrListChksum, AddrListIDStr, AddrListEntryBase, - AddrList, -) + AddrList) class PasswordListEntry(AddrListEntryBase): passwd = ListItemAttr(str, typeconv=False) # TODO: create Password type diff --git a/mmgen/proto/xmr/rpc.py b/mmgen/proto/xmr/rpc.py index fe722f8e..456eab6c 100644 --- a/mmgen/proto/xmr/rpc.py +++ b/mmgen/proto/xmr/rpc.py @@ -140,7 +140,7 @@ class MoneroWalletRPCClient(MoneroRPCClient): if 'closed connection' in str(e): if self.daemon.use_pidfile: try: - os.waitid(os.P_PID, int(self.daemon.pid), os.WEXITED|os.WNOHANG) # noqa ASYNC222 + os.waitid(os.P_PID, int(self.daemon.pid), os.WEXITED|os.WNOHANG) # noqa: ASYNC222 # The daemon really did stop, so skip the warning and return: except ChildProcessError: return True diff --git a/mmgen/tx/file.py b/mmgen/tx/file.py index fc34f0f9..b6254177 100644 --- a/mmgen/tx/file.py +++ b/mmgen/tx/file.py @@ -86,8 +86,9 @@ class MMGenTxFile(MMGenObject): if len(data) > tx.cfg.max_tx_file_size: die('MaxFileSizeExceeded', f'Transaction file size exceeds limit ({tx.cfg.max_tx_file_size} bytes)') - return (self.parse_data_json if data[0] == '{' else self.parse_data_legacy)( - data, infile, get_proto_only) + return ( + self.parse_data_json if data[0] == '{' else + self.parse_data_legacy)(data, infile, get_proto_only) def parse_data_json(self, data, infile, get_proto_only): tx = self.tx diff --git a/mmgen/tx/new.py b/mmgen/tx/new.py index 922996de..257712ee 100644 --- a/mmgen/tx/new.py +++ b/mmgen/tx/new.py @@ -24,8 +24,7 @@ from ..addr import ( CoinAddr, is_mmgen_addrtype, is_coin_addr, - is_addrlist_id -) + is_addrlist_id) def mmaddr2coinaddr(cfg, mmaddr, ad_w, ad_f, proto): diff --git a/mmgen/util2.py b/mmgen/util2.py index 783971d5..98ce3b78 100644 --- a/mmgen/util2.py +++ b/mmgen/util2.py @@ -116,8 +116,7 @@ bytespec_map = ( ('PB', 1000000000000000), ('P', 1125899906842624), ('EB', 1000000000000000000), - ('E', 1152921504606846976), -) + ('E', 1152921504606846976)) def int2bytespec(n, spec, fmt, *, print_sym=True, strip=False, add_space=False): diff --git a/setup.py b/setup.py index 86dcded7..e86527bb 100755 --- a/setup.py +++ b/setup.py @@ -64,5 +64,4 @@ setup( include_dirs = ['/usr/local/include'] if sys.platform == 'darwin' else [], library_dirs = ['/usr/local/lib'] if sys.platform == 'darwin' else [], extra_compile_args = ['-Wextra', '-Werror', '-fanalyzer'] if sys.platform == 'linux' else [], - )] -) + )]) diff --git a/test/cmdtest_d/httpd/thornode/swap.py b/test/cmdtest_d/httpd/thornode/swap.py index e36b2ca1..0ebc3fbb 100644 --- a/test/cmdtest_d/httpd/thornode/swap.py +++ b/test/cmdtest_d/httpd/thornode/swap.py @@ -168,8 +168,7 @@ class ThornodeSwapServer(ThornodeServer): data.update({ 'inbound_address': make_inbound_addr(self.cfg, send_proto, send_proto.preferred_mmtypes[0]), 'gas_rate_units': gas_rate_units[send_proto.base_proto_coin], - 'recommended_gas_rate': recommended_gas_rate[send_proto.base_proto_coin] - }) + 'recommended_gas_rate': recommended_gas_rate[send_proto.base_proto_coin]}) if send_asset == 'MM1': eth_proto = init_proto(self.cfg, 'eth', network='regtest') diff --git a/test/cmdtest_d/include/runner.py b/test/cmdtest_d/include/runner.py index d9aae74f..ef010082 100644 --- a/test/cmdtest_d/include/runner.py +++ b/test/cmdtest_d/include/runner.py @@ -25,8 +25,7 @@ from ...include.common import ( ok, start_test_daemons, init_coverage, - clean -) + clean) from .common import get_file_with_ext, confirm_continue from .cfg import cfgs diff --git a/test/cmdtest_d/ref.py b/test/cmdtest_d/ref.py index 7510a779..900f2a7b 100644 --- a/test/cmdtest_d/ref.py +++ b/test/cmdtest_d/ref.py @@ -25,16 +25,14 @@ from ..include.common import ( joinpath, cmp_or_die, ref_kafile_pass, - write_to_cfgfile, -) + write_to_cfgfile) from .include.common import ( dfl_words_file, ref_dir, chksum_pat, pwfile, ref_bw_file_spc, - skip -) + skip) from .base import CmdTestBase from .shared import CmdTestShared diff --git a/test/cmdtest_d/tool.py b/test/cmdtest_d/tool.py index 8a3d0020..369e8598 100644 --- a/test/cmdtest_d/tool.py +++ b/test/cmdtest_d/tool.py @@ -22,8 +22,7 @@ from ..include.common import ( cmp_or_die, joinpath, getrand, - sample_text -) + sample_text) from .include.common import ( hincog_fn, incog_id_fn, @@ -31,8 +30,7 @@ from .include.common import ( tool_enc_passwd, ref_dir, ref_enc_fn, - cleanup_env, -) + cleanup_env) from .base import CmdTestBase from .main import CmdTestMain diff --git a/test/cmdtest_d/xmrwallet.py b/test/cmdtest_d/xmrwallet.py index f7fbc6c5..fcf5760f 100644 --- a/test/cmdtest_d/xmrwallet.py +++ b/test/cmdtest_d/xmrwallet.py @@ -43,8 +43,7 @@ from ..include.common import ( end_silence, start_test_daemons, stop_test_daemons, - strip_ansi_escapes -) + strip_ansi_escapes) from .include.common import get_file_with_ext from .include.proxy import TestProxy from .base import CmdTestBase diff --git a/test/modtest_d/devtools.py b/test/modtest_d/devtools.py index 0fffd41a..951f05d7 100644 --- a/test/modtest_d/devtools.py +++ b/test/modtest_d/devtools.py @@ -30,15 +30,13 @@ text_data = ( (textA, textB, 'a/main.py', 'b/main.py', False, 'text: one line difference'), ('', textB, 'a/main.py', 'b/main.py', False, 'text: first file empty'), (textA, textA, 'a/main.py', 'b/main.py', False, 'text: identical files'), - ('', '', 'a/empty.txt', 'b/empty.txt', False, 'text: empty files'), -) + ('', '', 'a/empty.txt', 'b/empty.txt', False, 'text: empty files')) json_data = ( (jsonA, jsonB, 'a/data.json', 'b/data.json', True, 'json: one difference'), ('{}', jsonB, 'a/data.json', 'b/data.json', True, 'json: first file empty'), (jsonA, jsonA, 'a/data.json', 'b/data.json', True, 'json: identical files'), - ('{}', '{}', 'a/data.json', 'b/data.json', True, 'json: empty files'), -) + ('{}', '{}', 'a/data.json', 'b/data.json', True, 'json: empty files')) def print_hdr(hdr): print('{a} {b} {c}'.format( diff --git a/test/objattrtest_d/btc_mainnet.py b/test/objattrtest_d/btc_mainnet.py index a88ed4c0..951ca74f 100644 --- a/test/objattrtest_d/btc_mainnet.py +++ b/test/objattrtest_d/btc_mainnet.py @@ -38,8 +38,7 @@ from mmgen.seedsplit import ( SeedShareList, SeedShareLast, SeedShareMaster, - SeedShareMasterJoining -) + SeedShareMasterJoining) from mmgen.proto.btc.tw.unspent import BitcoinTwUnspentOutputs from mmgen.tx.base import Base diff --git a/test/tooltest.py b/test/tooltest.py index b2469c24..d6dd435a 100755 --- a/test/tooltest.py +++ b/test/tooltest.py @@ -70,8 +70,7 @@ from test.include.common import ( getrandhex, end_msg, init_coverage, - get_tmpfile, -) + get_tmpfile) set_globals(cfg) vmsg = cfg._util.vmsg