super(): use zero-arg form where possible
This commit is contained in:
parent
d0f8c44b20
commit
80675355c6
3 changed files with 9 additions and 9 deletions
|
|
@ -282,7 +282,7 @@ Actions: [q]uit view, [p]rint to file, pager [v]iew, [w]ide view,
|
|||
|
||||
def do_sort(self,key=None,reverse=False):
|
||||
if key == 'txid': return
|
||||
super(EthereumTwUnspentOutputs,self).do_sort(key=key,reverse=reverse)
|
||||
super().do_sort(key=key,reverse=reverse)
|
||||
|
||||
def get_unspent_rpc(self):
|
||||
wl = self.wallet.sorted_list
|
||||
|
|
@ -305,7 +305,7 @@ class EthereumTokenTwUnspentOutputs(EthereumTwUnspentOutputs):
|
|||
|
||||
# NB: two wallet instances open simultaneously on the same data:
|
||||
def get_unspent_data(self):
|
||||
super(type(self),self).get_unspent_data()
|
||||
super().get_unspent_data()
|
||||
for e in self.unspent:
|
||||
e.amt2 = self.wallet.get_eth_balance(e.addr)
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class EthereumMMGenTX(MMGenTX):
|
|||
usr_contract_data = HexStr('')
|
||||
|
||||
def __init__(self,*args,**kwargs):
|
||||
super(EthereumMMGenTX,self).__init__(*args,**kwargs)
|
||||
super().__init__(*args,**kwargs)
|
||||
if hasattr(opt,'tx_gas') and opt.tx_gas:
|
||||
self.tx_gas = self.start_gas = ETHAmt(int(opt.tx_gas),'wei')
|
||||
if hasattr(opt,'contract_data') and opt.contract_data:
|
||||
|
|
@ -463,7 +463,7 @@ class EthereumTokenMMGenTX(EthereumMMGenTX):
|
|||
die(1,(m1+m2).format(p=g.token,t=self.dcoin,n=capfirst(g.proto.name)))
|
||||
|
||||
def make_txobj(self): # called by create_raw()
|
||||
super(EthereumTokenMMGenTX,self).make_txobj()
|
||||
super().make_txobj()
|
||||
t = self.token_obj
|
||||
o = self.txobj
|
||||
o['token_addr'] = t.addr
|
||||
|
|
@ -472,7 +472,7 @@ class EthereumTokenMMGenTX(EthereumMMGenTX):
|
|||
o['data'] = t.create_data(o['token_to'],o['amt'])
|
||||
|
||||
def check_txfile_hex_data(self):
|
||||
d = super(EthereumTokenMMGenTX,self).check_txfile_hex_data()
|
||||
d = super().check_txfile_hex_data()
|
||||
o = self.txobj
|
||||
|
||||
if self.check_sigs(): # online, from rlp and wallet
|
||||
|
|
@ -496,7 +496,7 @@ class EthereumTokenMMGenTX(EthereumMMGenTX):
|
|||
return 'Token: {d} {c}\n{r}'.format(
|
||||
d=self.txobj['token_addr'].hl(),
|
||||
c=blue('(' + g.dcoin + ')'),
|
||||
r=super(EthereumTokenMMGenTX,self).format_view_body(*args,**kwargs))
|
||||
r=super().format_view_body(*args,**kwargs))
|
||||
|
||||
def do_sign(self,wif,tx_num_str):
|
||||
o = self.txobj
|
||||
|
|
|
|||
|
|
@ -1507,7 +1507,7 @@ class MMGenBumpTX(MMGenTX):
|
|||
|
||||
def __init__(self,filename,send=False):
|
||||
|
||||
super(MMGenBumpTX,self).__init__(filename)
|
||||
super().__init__(filename)
|
||||
|
||||
if not self.is_replaceable():
|
||||
die(1,"Transaction '{}' is not replaceable".format(self.txid))
|
||||
|
|
@ -1563,7 +1563,7 @@ class MMGenBumpTX(MMGenTX):
|
|||
self.update_output_amt(op_idx,self.sum_inputs()-self.sum_outputs(exclude=op_idx)-fee)
|
||||
|
||||
def convert_and_check_fee(self,tx_fee,desc):
|
||||
ret = super(MMGenBumpTX,self).convert_and_check_fee(tx_fee,desc)
|
||||
ret = super().convert_and_check_fee(tx_fee,desc)
|
||||
if ret < self.min_fee:
|
||||
msg('{} {c}: {} fee too small. Minimum fee: {} {c} ({} {})'.format(
|
||||
ret,desc,self.min_fee,self.fee_abs2rel(self.min_fee.hl()),self.rel_fee_desc,c=g.coin))
|
||||
|
|
@ -1604,7 +1604,7 @@ class MMGenSplitTX(MMGenTX):
|
|||
except:
|
||||
ymsg('Connect to {} daemon failed. Network fee estimation unavailable'.format(g.coin))
|
||||
return self.get_usr_fee_interactive(opt.tx_fee,'User-selected')
|
||||
return super(type(self),self).get_fee_from_user()
|
||||
return super().get_fee_from_user()
|
||||
|
||||
def create_split(self,mmid):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue