Browse Source

more whitespace, comments throughout (excluding tests)

The MMGen Project 1 year ago
parent
commit
7cb0e439e2
4 changed files with 8 additions and 5 deletions
  1. 1 1
      mmgen/obj.py
  2. 1 0
      mmgen/tool/fileutil.py
  3. 4 2
      mmgen/tool/wallet.py
  4. 2 2
      mmgen/tw/view.py

+ 1 - 1
mmgen/obj.py

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

+ 1 - 0
mmgen/tool/fileutil.py

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

+ 4 - 2
mmgen/tool/wallet.py

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

+ 2 - 2
mmgen/tw/view.py

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