From b8fb987bb3869b2f1bda6ea5c642ea6c9480728e Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Wed, 11 Oct 2023 12:58:51 +0000 Subject: [PATCH] pylint (test suite) - inherit from object implicitly --- test/gentest.py | 2 +- test/test.py | 4 ++-- test/test_py_d/ts_shared.py | 2 +- test/tooltest.py | 4 ++-- test/unit_tests_d/ut_addrparse.py | 2 +- test/unit_tests_d/ut_baseconv.py | 2 +- test/unit_tests_d/ut_bip39.py | 2 +- test/unit_tests_d/ut_flags.py | 2 +- test/unit_tests_d/ut_indexed_dict.py | 2 +- test/unit_tests_d/ut_lockable.py | 2 +- test/unit_tests_d/ut_mn_entry.py | 2 +- test/unit_tests_d/ut_scrypt.py | 2 +- test/unit_tests_d/ut_seedsplit.py | 2 +- test/unit_tests_d/ut_subseed.py | 2 +- test/unit_tests_d/ut_xmrseed.py | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/test/gentest.py b/test/gentest.py index 0a2b3704..97781807 100755 --- a/test/gentest.py +++ b/test/gentest.py @@ -138,7 +138,7 @@ def get_cmd_output(cmd,input=None): saved_results = {} -class GenTool(object): +class GenTool: def __init__(self,proto,addr_type): self.proto = proto diff --git a/test/test.py b/test/test.py index 3269f10e..883dda18 100755 --- a/test/test.py +++ b/test/test.py @@ -367,7 +367,7 @@ def set_restore_term_at_exit(): termios.tcsetattr(fd, termios.TCSADRAIN, old) atexit.register(at_exit) -class CmdGroupMgr(object): +class CmdGroupMgr: from test.test_py_d.cfg import cmd_groups_dfl,cmd_groups_extra @@ -538,7 +538,7 @@ class CmdGroupMgr(object): return None -class TestSuiteRunner(object): +class TestSuiteRunner: 'test suite runner' def __del__(self): diff --git a/test/test_py_d/ts_shared.py b/test/test_py_d/ts_shared.py index c5a44d90..b339703e 100755 --- a/test/test_py_d/ts_shared.py +++ b/test/test_py_d/ts_shared.py @@ -28,7 +28,7 @@ from mmgen.wallet import get_wallet_cls from ..include.common import cmp_or_die,strip_ansi_escapes,joinpath from .common import ref_bw_file,ref_bw_hash_preset,ref_dir -class TestSuiteShared(object): +class TestSuiteShared: 'shared methods for the test.py test suite' def txcreate_ui_common( diff --git a/test/tooltest.py b/test/tooltest.py index 124f6bbc..d87bffbc 100755 --- a/test/tooltest.py +++ b/test/tooltest.py @@ -227,7 +227,7 @@ type_compressed_arg = ([],['--type=' + (cfg.type or 'compressed')])[bool(cfg.typ type_segwit_arg = ([],['--type=segwit'])['S' in proto.mmtypes] type_bech32_arg = ([],['--type=bech32'])['B' in proto.mmtypes] -class MMGenToolTestUtils(object): +class MMGenToolTestUtils: def run_cmd(self,name,tool_args,kwargs='',extra_msg='',silent=False,strip=True,add_opts=[],binary=False): sys_cmd = ( @@ -334,7 +334,7 @@ def ok_or_die(val,chk_func,s,skip_ok=False): else: die(4,f'Returned value {val!r} is not a {s}') -class MMGenToolTestCmds(object): +class MMGenToolTestCmds: # Cryptocoin def randwif(self,name): diff --git a/test/unit_tests_d/ut_addrparse.py b/test/unit_tests_d/ut_addrparse.py index 7276c4d1..f500de9a 100755 --- a/test/unit_tests_d/ut_addrparse.py +++ b/test/unit_tests_d/ut_addrparse.py @@ -83,7 +83,7 @@ def test_network(proto,addrs): vmsg('') -class unit_test(object): +class unit_test: def run_test(self,name,ut): diff --git a/test/unit_tests_d/ut_baseconv.py b/test/unit_tests_d/ut_baseconv.py index 1353f0b2..154d5912 100755 --- a/test/unit_tests_d/ut_baseconv.py +++ b/test/unit_tests_d/ut_baseconv.py @@ -8,7 +8,7 @@ from mmgen.util import msg,msg_r from ..include.common import cfg,qmsg,qmsg_r,vmsg,vmsg_r -class unit_test(object): +class unit_test: vectors = { 'b58': ( diff --git a/test/unit_tests_d/ut_bip39.py b/test/unit_tests_d/ut_bip39.py index 80145584..983f9b65 100755 --- a/test/unit_tests_d/ut_bip39.py +++ b/test/unit_tests_d/ut_bip39.py @@ -8,7 +8,7 @@ from mmgen.util import msg,msg_r from ..include.common import cfg,qmsg,vmsg -class unit_test(object): +class unit_test: vectors = ( ( "00000000000000000000000000000000", diff --git a/test/unit_tests_d/ut_flags.py b/test/unit_tests_d/ut_flags.py index 830b89fe..5196963c 100755 --- a/test/unit_tests_d/ut_flags.py +++ b/test/unit_tests_d/ut_flags.py @@ -8,7 +8,7 @@ from mmgen.flags import ClassOpts,ClassFlags from ..include.common import qmsg,qmsg_r,vmsg -class unit_test(object): +class unit_test: def run_test(self,name,ut): diff --git a/test/unit_tests_d/ut_indexed_dict.py b/test/unit_tests_d/ut_indexed_dict.py index 9a31a739..6bdea25a 100755 --- a/test/unit_tests_d/ut_indexed_dict.py +++ b/test/unit_tests_d/ut_indexed_dict.py @@ -8,7 +8,7 @@ from mmgen.util import msg,msg_r,die from ..include.common import vmsg -class unit_test(object): +class unit_test: def run_test(self,name,ut): bad_msg = ( diff --git a/test/unit_tests_d/ut_lockable.py b/test/unit_tests_d/ut_lockable.py index cddbefa0..5b03096d 100755 --- a/test/unit_tests_d/ut_lockable.py +++ b/test/unit_tests_d/ut_lockable.py @@ -6,7 +6,7 @@ test.unit_tests_d.ut_lockable: unit test for the MMGen suite's Lockable class from ..include.common import qmsg,qmsg_r,vmsg -class unit_test(object): +class unit_test: def run_test(self,name,ut): diff --git a/test/unit_tests_d/ut_mn_entry.py b/test/unit_tests_d/ut_mn_entry.py index 326b437b..2219261c 100755 --- a/test/unit_tests_d/ut_mn_entry.py +++ b/test/unit_tests_d/ut_mn_entry.py @@ -7,7 +7,7 @@ test.unit_tests_d.ut_mn_entry: Mnemonic user entry unit test for the MMGen suite from mmgen.util import msg,msg_r from ..include.common import cfg,qmsg -class unit_test(object): +class unit_test: vectors = { 'mmgen': { diff --git a/test/unit_tests_d/ut_scrypt.py b/test/unit_tests_d/ut_scrypt.py index 10681593..04abc758 100755 --- a/test/unit_tests_d/ut_scrypt.py +++ b/test/unit_tests_d/ut_scrypt.py @@ -7,7 +7,7 @@ test.unit_tests_d.ut_scrypt: password hashing unit test for the MMGen suite from ..include.common import cfg,qmsg,vmsg,omsg_r,silence,end_silence from mmgen.util import msg,msg_r -class unit_test(object): +class unit_test: def run_test(self,name,ut): import time diff --git a/test/unit_tests_d/ut_seedsplit.py b/test/unit_tests_d/ut_seedsplit.py index 334e2c70..6a1ee1f6 100755 --- a/test/unit_tests_d/ut_seedsplit.py +++ b/test/unit_tests_d/ut_seedsplit.py @@ -8,7 +8,7 @@ from mmgen.util import msg,msg_r from ..include.common import cfg,vmsg,vmsg_r -class unit_test(object): +class unit_test: def run_test(self,name,ut): from mmgen.seed import Seed diff --git a/test/unit_tests_d/ut_subseed.py b/test/unit_tests_d/ut_subseed.py index 4a39e021..864d4df5 100755 --- a/test/unit_tests_d/ut_subseed.py +++ b/test/unit_tests_d/ut_subseed.py @@ -8,7 +8,7 @@ from mmgen.util import msg,msg_r from ..include.common import cfg,vmsg_r -class unit_test(object): +class unit_test: def run_test(self,name,ut): from mmgen.seed import Seed diff --git a/test/unit_tests_d/ut_xmrseed.py b/test/unit_tests_d/ut_xmrseed.py index 18bf6132..de34cb02 100755 --- a/test/unit_tests_d/ut_xmrseed.py +++ b/test/unit_tests_d/ut_xmrseed.py @@ -8,7 +8,7 @@ from mmgen.util import msg,msg_r,ymsg from ..include.common import cfg,qmsg,vmsg -class unit_test(object): +class unit_test: vectors = ( # private keys are reduced ( '148d78d2aba7dbca5cd8f6abcfb0b3c009ffbdbea1ff373d50ed94d78286640e', # Monero repo