From 4a667873d1d7f2b5d2f794d9b9654a29bb4aa5bd Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sun, 13 Sep 2026 15:50:13 +0000 Subject: [PATCH] whitespace, comments, formatting (minor) --- mmgen/cfg.py | 2 +- scripts/create-token.py | 3 ++- test/clean.py | 3 ++- test/cmdtest_d/ref_3seed.py | 7 +------ test/cmdtest_d/regtest.py | 17 ++++++++++++----- test/include/coin_daemon_control.py | 5 ++++- test/include/common.py | 3 +-- test/include/unit_test.py | 2 -- 8 files changed, 23 insertions(+), 19 deletions(-) diff --git a/mmgen/cfg.py b/mmgen/cfg.py index 20313181..701e9900 100755 --- a/mmgen/cfg.py +++ b/mmgen/cfg.py @@ -200,11 +200,11 @@ class Config(Lockable): # debug debug = False + debug_addrlist = False debug_daemon = False debug_evm = False debug_opts = False debug_rpc = False - debug_addrlist = False debug_subseed = False debug_tw = False devtools = False diff --git a/scripts/create-token.py b/scripts/create-token.py index 8b45c189..80c6a4e8 100755 --- a/scripts/create-token.py +++ b/scripts/create-token.py @@ -150,7 +150,8 @@ def compile_code(cfg, code): cfg._util.vmsg(out) def main(): - cfg = Config(opts_data=opts_data) + cfg = Config( + opts_data = opts_data) if cfg.check_solc_version: sys.exit(0 if check_solc_version() else 1) diff --git a/test/clean.py b/test/clean.py index 85577c8d..451729ce 100755 --- a/test/clean.py +++ b/test/clean.py @@ -34,7 +34,8 @@ opts_data = { cfg = Config( opts_data = opts_data, need_proto = False, - init_opts = {'skip_cfg_file': True}) + init_opts = { + 'skip_cfg_file': True}) from test.overlay import get_overlay_tree_dir overlay_tree_dir = get_overlay_tree_dir(repo_root) diff --git a/test/cmdtest_d/ref_3seed.py b/test/cmdtest_d/ref_3seed.py index 36f0b562..48b233cf 100755 --- a/test/cmdtest_d/ref_3seed.py +++ b/test/cmdtest_d/ref_3seed.py @@ -183,12 +183,7 @@ class CmdTestRef3Seed(CmdTestBase, CmdTestShared): pat = re_pat.format(sid, slen) assert re.match(pat, fn), f'{pat} != {fn}' else: - cmp_or_die('{}[{}]{}.{}'.format( - sid, - slen, - '-α' if self.cfg.debug_utf8 else '', - wcls.ext), - fn) + cmp_or_die('{}[{}]{}.{}'.format(sid, slen, '-α' if self.cfg.debug_utf8 else '', wcls.ext), fn) return t def ref_walletconv_words(self): diff --git a/test/cmdtest_d/regtest.py b/test/cmdtest_d/regtest.py index a01941d1..39bfd80a 100755 --- a/test/cmdtest_d/regtest.py +++ b/test/cmdtest_d/regtest.py @@ -693,9 +693,12 @@ class CmdTestRegtest(CmdTestBase, CmdTestShared): for mmtype in mmtypes or proto.mmtypes: desc = MMGenAddrType.mmtypes[mmtype].name addrfile = joinpath(self._user_dir(user), - '{}{}{}[{}]{x}.regtest.addrs'.format( - sid, self.get_altcoin_pfx(proto.coin), id_strs[desc], addr_range, - x='-α' if self.cfg.debug_utf8 else '')) + '{}{}{}[{}]{}.regtest.addrs'.format( + sid, + self.get_altcoin_pfx(proto.coin), + id_strs[desc], + addr_range, + '-α' if self.cfg.debug_utf8 else '')) if mmtype == proto.mmtypes[0] and user == 'bob': self._add_comments_to_addr_file(proto, addrfile, addrfile, use_comments=True) t = self.spawn( @@ -1176,8 +1179,12 @@ class CmdTestRegtest(CmdTestBase, CmdTestShared): def get_addr_from_addrlist(self, user, sid, mmtype, idx, addr_range='1-5', proto=None): proto = proto or self.proto id_str = {'L':'', 'S':'-S', 'C':'-C', 'B':'-B'}[mmtype] - ext = '{}{}{}[{}]{x}.regtest.addrs'.format( - sid, self.get_altcoin_pfx(proto.coin), id_str, addr_range, x='-α' if self.cfg.debug_utf8 else '') + ext = '{}{}{}[{}]{}.regtest.addrs'.format( + sid, + self.get_altcoin_pfx(proto.coin), + id_str, + addr_range, + '-α' if self.cfg.debug_utf8 else '') addrfile = get_file_with_ext(self._user_dir(user), ext, no_dot=True) silence() addr = AddrList(self.cfg, proto, infile=addrfile).data[idx].addr diff --git a/test/include/coin_daemon_control.py b/test/include/coin_daemon_control.py index 3f77a3ce..fd7f1590 100755 --- a/test/include/coin_daemon_control.py +++ b/test/include/coin_daemon_control.py @@ -151,4 +151,7 @@ def main(): for network_id in ids: run(network_id=network_id.lower()) -cfg = Config(opts_data=opts_data, init_opts={'skip_cfg_file': True}) +cfg = Config( + opts_data = opts_data, + init_opts = { + 'skip_cfg_file': True}) diff --git a/test/include/common.py b/test/include/common.py index 20ca48a0..9390b3ea 100755 --- a/test/include/common.py +++ b/test/include/common.py @@ -109,8 +109,7 @@ proto_cmds = ( 'txdo', 'txsend', 'txsign', - 'xmrwallet', -) + 'xmrwallet') def getrand(n): if cfg.test_suite_deterministic: diff --git a/test/include/unit_test.py b/test/include/unit_test.py index 56e23373..9b372524 100755 --- a/test/include/unit_test.py +++ b/test/include/unit_test.py @@ -26,8 +26,6 @@ os.environ['MMGEN_TEST_SUITE_LEGACY_TX'] = '1' from .test_init import repo_root -# for the unit tests, violate MMGen Project best practices and allow use of the dev tools -# in production code: if not os.getenv('MMGEN_DEVTOOLS'): from mmgen.devinit import init_dev init_dev()