more whitespace, comments throughout (excluding tests)
This commit is contained in:
parent
a4cb7e3c72
commit
7cb0e439e2
4 changed files with 8 additions and 5 deletions
|
|
@ -124,7 +124,7 @@ class ImmutableAttr: # Descriptor
|
|||
else:
|
||||
self.conv = lambda instance,value: dtype(value)
|
||||
else:
|
||||
"check this attribute's type"
|
||||
# check this attribute's type
|
||||
def assign_with_check(instance,value):
|
||||
if type(value) is dtype:
|
||||
return value
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ class tool_cmd(tool_cmd_base):
|
|||
nbytes = parse_bytespec(nbytes)
|
||||
if self.cfg.outdir:
|
||||
outfile = make_full_path( self.cfg.outdir, outfile )
|
||||
|
||||
f = open(outfile,'wb')
|
||||
|
||||
key = Crypto(self.cfg).get_random(32)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,8 @@ class tool_cmd(tool_cmd_base):
|
|||
"list a range of subseed Seed IDs for default or specified wallet"
|
||||
self.cfg.quiet = True
|
||||
from ..subseed import SubSeedIdxRange
|
||||
return Wallet(self.cfg,self._get_seed_file(wallet)).seed.subseeds.format( *SubSeedIdxRange(subseed_idx_range) )
|
||||
return Wallet(self.cfg,self._get_seed_file(wallet)).seed.subseeds.format(
|
||||
*SubSeedIdxRange(subseed_idx_range) )
|
||||
|
||||
def list_shares(self,
|
||||
share_count: int,
|
||||
|
|
@ -64,7 +65,8 @@ class tool_cmd(tool_cmd_base):
|
|||
wallet = '' ):
|
||||
"list the Seed IDs of the shares resulting from a split of default or specified wallet"
|
||||
self.cfg.quiet = True
|
||||
return Wallet(self.cfg,self._get_seed_file(wallet)).seed.split( share_count, id_str, master_share ).format()
|
||||
return Wallet(self.cfg,self._get_seed_file(wallet)).seed.split(
|
||||
share_count, id_str, master_share ).format()
|
||||
|
||||
def gen_key(self,mmgen_addr:str,wallet=''):
|
||||
"generate a single WIF key for specified MMGen address from default or specified wallet"
|
||||
|
|
|
|||
|
|
@ -371,8 +371,8 @@ class TwView(MMGenObject,metaclass=AsyncInit):
|
|||
|
||||
def set_amt_widths(self,data):
|
||||
# width of amts column: min(7,width of integer part) + len('.') + width of fractional part
|
||||
self.amt_widths = {k:
|
||||
min(7,max(len(str(getattr(d,k).to_integral_value())) for d in data)) + 1 + self.disp_prec
|
||||
self.amt_widths = {
|
||||
k:min(7,max(len(str(getattr(d,k).to_integral_value())) for d in data)) + 1 + self.disp_prec
|
||||
for k in self.amt_keys}
|
||||
|
||||
async def format(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue