whitespace, minor cleanups
This commit is contained in:
parent
838d445299
commit
6b2da4b7e4
6 changed files with 12 additions and 12 deletions
|
|
@ -272,7 +272,7 @@ if gc.prog_name.endswith('-tool'):
|
|||
cmd, *args = cfg._args
|
||||
|
||||
if cmd in ('help', 'usage') and args:
|
||||
args[0] = 'command_name=' + args[0]
|
||||
args[0] = 'cmdname=' + args[0]
|
||||
|
||||
args, kwargs = process_args(cmd, args, cls)
|
||||
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ def gen_tool_cmd_usage(mod, cmdname):
|
|||
for line in docstr.split('\n')[1:]:
|
||||
yield line.lstrip('\t')
|
||||
|
||||
def usage(cmdname=None, *, exit_val=1):
|
||||
def usage(cmdname, *, exit_val=1):
|
||||
|
||||
from ..util import Msg, die
|
||||
|
||||
|
|
@ -204,10 +204,10 @@ def usage(cmdname=None, *, exit_val=1):
|
|||
class tool_cmd(tool_cmd_base):
|
||||
"help/usage commands"
|
||||
|
||||
def help(self, command_name=''):
|
||||
def help(self, cmdname=''):
|
||||
"display usage information for a single command or all commands"
|
||||
usage(command_name, exit_val=0)
|
||||
usage(cmdname, exit_val=0)
|
||||
|
||||
def usage(self, command_name=''):
|
||||
def usage(self, cmdname=''):
|
||||
"display usage information for a single command or all commands"
|
||||
usage(command_name, exit_val=0)
|
||||
usage(cmdname, exit_val=0)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ ignore = [
|
|||
[tool.ruff.lint.per-file-ignores]
|
||||
"protobuf.py" = [ "UP045" ] # Use `X | None` for type annotations
|
||||
"mmgen/rpc/backends/curl.py" = [ "ASYNC221" ] # blocking method in async function
|
||||
"create-bip-hd-chain-params.py" = [ "F401" ]
|
||||
"create-bip-hd-chain-params.py" = [ "F401" ] # imported but unused
|
||||
|
||||
"examples/*" = [ "ASYNC230" ] # open() in async function
|
||||
|
||||
|
|
|
|||
|
|
@ -677,7 +677,7 @@ class CmdTestXMRWallet(CmdTestBase):
|
|||
|
||||
async def mine(self, nblks):
|
||||
start_height = height = await self._get_height()
|
||||
imsg(f'Height: {height}')
|
||||
imsg(f'Chain height: {height}')
|
||||
imsg_r(f'Mining {nblks} block{suf(nblks)}...')
|
||||
await self.start_mining()
|
||||
while height < start_height + nblks:
|
||||
|
|
@ -686,7 +686,7 @@ class CmdTestXMRWallet(CmdTestBase):
|
|||
imsg_r('.')
|
||||
ret = await self.stop_mining()
|
||||
imsg('done')
|
||||
imsg(f'Height: {height}')
|
||||
imsg(f'Chain height: {height}')
|
||||
return 'ok' if ret == 'OK' else False
|
||||
|
||||
async def start_mining(self):
|
||||
|
|
@ -815,7 +815,7 @@ class CmdTestXMRWallet(CmdTestBase):
|
|||
if count > 12: # something might have gone wrong, so be more verbose
|
||||
if not verbose:
|
||||
imsg('')
|
||||
imsg_r(f'Height: {h}, ')
|
||||
imsg_r(f'Chain height: {h}, ')
|
||||
print_balance(dest, bal_info)
|
||||
verbose = True
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ If no test is specified, all available tests are run
|
|||
|
||||
sys.argv.insert(1, '--skip-cfg-file')
|
||||
|
||||
cfg = Config(opts_data=opts_data)
|
||||
cfg = Config(opts_data=opts_data, init_opts={'allow_legacy_tx_files': True})
|
||||
|
||||
type(cfg)._reset_ok += ('use_internal_keccak_module', 'debug_addrlist')
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ cfg = Config(
|
|||
'usr_randchars': 0,
|
||||
'hash_preset': '1',
|
||||
'passwd_file': 'test/ref/keyaddrfile_password',
|
||||
})
|
||||
'allow_legacy_tx_files': True})
|
||||
|
||||
set_globals(cfg)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue