pylint throughout (excluding tests) - inherit from object implicitly

This commit is contained in:
The MMGen Project 2023-10-11 12:58:49 +00:00
commit 881c6fea03
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
8 changed files with 11 additions and 11 deletions

View file

@ -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

View file

@ -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 = {

View file

@ -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.
"""

View file

@ -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': """

View file

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

View file

@ -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):

View file

@ -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

View file

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