Browse Source

pylint (test suite) - inherit from object implicitly

The MMGen Project 1 year ago
parent
commit
b8fb987bb3

+ 1 - 1
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

+ 2 - 2
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):

+ 1 - 1
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(

+ 2 - 2
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):

+ 1 - 1
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):
 

+ 1 - 1
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': (

+ 1 - 1
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",

+ 1 - 1
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):
 

+ 1 - 1
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 = (

+ 1 - 1
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):
 

+ 1 - 1
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':   {

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
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