minor fixes and cleanups

This commit is contained in:
The MMGen Project 2025-01-27 16:01:48 +00:00
commit 7131b892e3
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
4 changed files with 7 additions and 4 deletions

View file

@ -35,7 +35,7 @@ def die2(exit_val, s):
class GlobalConstants(Lockable):
"""
These values are non-runtime-configurable. Theyre constant for a given machine,
user, executable and MMGen release.
user, executable and MMGen Wallet version
"""
_autolock = True
@ -367,6 +367,7 @@ class Config(Lockable):
'MMGEN_ENABLE_ERIGON',
'MMGEN_DISABLE_COLOR',
)
_infile_opts = (
'keys_from_file',
'mmgen_keys_from_file',
@ -375,6 +376,7 @@ class Config(Lockable):
'comment_file',
'contract_data',
)
# Auto-typechecked and auto-set opts - first value in list is the default
_ov = namedtuple('autoset_opt_info', ['type', 'choices'])
_autoset_opts = {

View file

@ -10,7 +10,7 @@
import sys, os
from pathlib import Path
from subprocess import run, PIPE
from subprocess import run
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext

View file

@ -84,5 +84,5 @@ for k in ('fee_estimate_mode',): # _autoset_opts
msg('{:30} {}'.format(f'cfg.{k}:', getattr(cfg, k)))
msg('')
for n, k in enumerate(cfg._args, 1):
msg(f'arg{n}: {k}')
for n, arg in enumerate(cfg._args, 1):
msg(f'arg{n}: {arg}')

View file

@ -74,6 +74,7 @@ init_tests() {
[ "$VERBOSE" ] || STDOUT_DEVNULL='> /dev/null'
d_lint="code errors with static code analyzer"
t_lint="
b ruff check setup.py $STDOUT_DEVNULL
b ruff check mmgen $STDOUT_DEVNULL
b ruff check test $STDOUT_DEVNULL
b ruff check examples $STDOUT_DEVNULL