Browse Source

pylint throughout (excluding tests) - inherit from object implicitly

The MMGen Project 1 year ago
parent
commit
881c6fea03
8 changed files with 11 additions and 11 deletions
  1. 1 1
      mmgen/altcoin.py
  2. 1 1
      mmgen/baseconv.py
  3. 3 3
      mmgen/contrib/keccak.py
  4. 2 2
      mmgen/mn_entry.py
  5. 1 1
      mmgen/proto/btc/tx/status.py
  6. 1 1
      mmgen/seedsplit.py
  7. 1 1
      mmgen/sha2.py
  8. 1 1
      mmgen/term.py

+ 1 - 1
mmgen/altcoin.py

@@ -55,7 +55,7 @@ def test_equal(desc,a,b,*cdata):
 ce = namedtuple('CoinInfoEntry',
 	['name','symbol','wif_ver_num','p2pkh_info','p2sh_info','has_segwit','trust_level'])
 
-class CoinInfo(object):
+class CoinInfo:
 	coin_constants = {}
 	coin_constants['mainnet'] = (
 #   Trust levels: -1=disabled 0=untested 1=low 2=med 3=high 4=very high (no warn) 5=unconditional

+ 1 - 1
mmgen/baseconv.py

@@ -37,7 +37,7 @@ def is_mmgen_mnemonic(s):
 	except:
 		return False
 
-class baseconv(object):
+class baseconv:
 	mn_base = 1626
 	dt = namedtuple('desc_tuple',['short','long'])
 	constants = {

+ 3 - 3
mmgen/contrib/keccak.py

@@ -104,7 +104,7 @@ def keccak_f(state):
 	for ir in range(nr):
 		round(state.s, RoundConstants[ir])
 
-class KeccakState(object):
+class KeccakState:
 	"""
 	A keccak state container.
 
@@ -216,7 +216,7 @@ class KeccakState(object):
 				self.s[x][y] = KeccakState.bytes2lane(bb[i:i+8])
 				i += 8
 
-class KeccakSponge(object):
+class KeccakSponge:
 	def __init__(self, bitrate, width, padfn, permfn):
 		self.state = KeccakState(bitrate, width)
 		self.padfn = padfn
@@ -254,7 +254,7 @@ class KeccakSponge(object):
 			Z += self.squeeze_once()
 		return Z[:l]
 
-class KeccakHash(object):
+class KeccakHash:
 	"""
 	The Keccak hash function, with a hashlib-compatible interface.
 	"""

+ 2 - 2
mmgen/mn_entry.py

@@ -29,7 +29,7 @@ from .color import cyan
 _return_chars = '\n\r '
 _erase_chars = '\b\x7f'
 
-class MnEntryMode(object):
+class MnEntryMode:
 	"""
 	Subclasses must implement:
 	  - pad_max:    pad character limit (None if variable)
@@ -212,7 +212,7 @@ class MnEntryModeMinimal(MnEntryMode):
 				if pad > self.pad_max:
 					return mne.idx(s,'full',lo_idx=lo,hi_idx=hi)
 
-class MnemonicEntry(object):
+class MnemonicEntry:
 
 	prompt_info = {
 		'intro': """

+ 1 - 1
mmgen/proto/btc/tx/status.py

@@ -23,7 +23,7 @@ class Status(TxBase.Status):
 
 		tx = self.tx
 
-		class r(object):
+		class r:
 			pass
 
 		async def is_in_wallet():

+ 1 - 1
mmgen/seedsplit.py

@@ -305,7 +305,7 @@ def join_shares(
 	if not hasattr(seed_list,'__next__'): # seed_list can be iterator or iterable
 		seed_list = iter(seed_list)
 
-	class d(object):
+	class d:
 		byte_len,ret,count = None,0,0
 
 	def add_share(ss):

+ 1 - 1
mmgen/sha2.py

@@ -29,7 +29,7 @@ sha2: A non-optimized but very compact implementation of the SHA2 hash
 
 from struct import pack,unpack
 
-class Sha2(object):
+class Sha2:
 	'Implementation based on the pseudocode at https://en.wikipedia.org/wiki/SHA-2'
 	K = None
 

+ 1 - 1
mmgen/term.py

@@ -42,7 +42,7 @@ except:
 
 _term_dimensions = namedtuple('terminal_dimensions',['width','height'])
 
-class MMGenTerm(object):
+class MMGenTerm:
 
 	@classmethod
 	def register_cleanup(cls):