whitespace

This commit is contained in:
The MMGen Project 2026-10-25 10:11:09 +00:00
commit 3ff5e532a6
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
16 changed files with 21 additions and 37 deletions

View file

@ -30,8 +30,7 @@ from .util import (
is_utf8,
capfirst,
make_full_path,
strip_comments,
)
strip_comments)
def check_or_create_dir(cfg, path):
try:

View file

@ -19,8 +19,7 @@ from .msg import (
UnsignedMsg,
SignedMsg,
SignedOnlineMsg,
ExportedMsgSigs,
)
ExportedMsgSigs)
class MsgOps:
ops = ('create', 'sign', 'verify')

View file

@ -28,8 +28,7 @@ from .addrlist import (
AddrListChksum,
AddrListIDStr,
AddrListEntryBase,
AddrList,
)
AddrList)
class PasswordListEntry(AddrListEntryBase):
passwd = ListItemAttr(str, typeconv=False) # TODO: create Password type

View file

@ -140,7 +140,7 @@ class MoneroWalletRPCClient(MoneroRPCClient):
if 'closed connection' in str(e):
if self.daemon.use_pidfile:
try:
os.waitid(os.P_PID, int(self.daemon.pid), os.WEXITED|os.WNOHANG) # noqa ASYNC222
os.waitid(os.P_PID, int(self.daemon.pid), os.WEXITED|os.WNOHANG) # noqa: ASYNC222
# The daemon really did stop, so skip the warning and return:
except ChildProcessError:
return True

View file

@ -86,8 +86,9 @@ class MMGenTxFile(MMGenObject):
if len(data) > tx.cfg.max_tx_file_size:
die('MaxFileSizeExceeded',
f'Transaction file size exceeds limit ({tx.cfg.max_tx_file_size} bytes)')
return (self.parse_data_json if data[0] == '{' else self.parse_data_legacy)(
data, infile, get_proto_only)
return (
self.parse_data_json if data[0] == '{' else
self.parse_data_legacy)(data, infile, get_proto_only)
def parse_data_json(self, data, infile, get_proto_only):
tx = self.tx

View file

@ -24,8 +24,7 @@ from ..addr import (
CoinAddr,
is_mmgen_addrtype,
is_coin_addr,
is_addrlist_id
)
is_addrlist_id)
def mmaddr2coinaddr(cfg, mmaddr, ad_w, ad_f, proto):

View file

@ -116,8 +116,7 @@ bytespec_map = (
('PB', 1000000000000000),
('P', 1125899906842624),
('EB', 1000000000000000000),
('E', 1152921504606846976),
)
('E', 1152921504606846976))
def int2bytespec(n, spec, fmt, *, print_sym=True, strip=False, add_space=False):

View file

@ -64,5 +64,4 @@ setup(
include_dirs = ['/usr/local/include'] if sys.platform == 'darwin' else [],
library_dirs = ['/usr/local/lib'] if sys.platform == 'darwin' else [],
extra_compile_args = ['-Wextra', '-Werror', '-fanalyzer'] if sys.platform == 'linux' else [],
)]
)
)])

View file

@ -168,8 +168,7 @@ class ThornodeSwapServer(ThornodeServer):
data.update({
'inbound_address': make_inbound_addr(self.cfg, send_proto, send_proto.preferred_mmtypes[0]),
'gas_rate_units': gas_rate_units[send_proto.base_proto_coin],
'recommended_gas_rate': recommended_gas_rate[send_proto.base_proto_coin]
})
'recommended_gas_rate': recommended_gas_rate[send_proto.base_proto_coin]})
if send_asset == 'MM1':
eth_proto = init_proto(self.cfg, 'eth', network='regtest')

View file

@ -25,8 +25,7 @@ from ...include.common import (
ok,
start_test_daemons,
init_coverage,
clean
)
clean)
from .common import get_file_with_ext, confirm_continue
from .cfg import cfgs

View file

@ -25,16 +25,14 @@ from ..include.common import (
joinpath,
cmp_or_die,
ref_kafile_pass,
write_to_cfgfile,
)
write_to_cfgfile)
from .include.common import (
dfl_words_file,
ref_dir,
chksum_pat,
pwfile,
ref_bw_file_spc,
skip
)
skip)
from .base import CmdTestBase
from .shared import CmdTestShared

View file

@ -22,8 +22,7 @@ from ..include.common import (
cmp_or_die,
joinpath,
getrand,
sample_text
)
sample_text)
from .include.common import (
hincog_fn,
incog_id_fn,
@ -31,8 +30,7 @@ from .include.common import (
tool_enc_passwd,
ref_dir,
ref_enc_fn,
cleanup_env,
)
cleanup_env)
from .base import CmdTestBase
from .main import CmdTestMain

View file

@ -43,8 +43,7 @@ from ..include.common import (
end_silence,
start_test_daemons,
stop_test_daemons,
strip_ansi_escapes
)
strip_ansi_escapes)
from .include.common import get_file_with_ext
from .include.proxy import TestProxy
from .base import CmdTestBase

View file

@ -30,15 +30,13 @@ text_data = (
(textA, textB, 'a/main.py', 'b/main.py', False, 'text: one line difference'),
('', textB, 'a/main.py', 'b/main.py', False, 'text: first file empty'),
(textA, textA, 'a/main.py', 'b/main.py', False, 'text: identical files'),
('', '', 'a/empty.txt', 'b/empty.txt', False, 'text: empty files'),
)
('', '', 'a/empty.txt', 'b/empty.txt', False, 'text: empty files'))
json_data = (
(jsonA, jsonB, 'a/data.json', 'b/data.json', True, 'json: one difference'),
('{}', jsonB, 'a/data.json', 'b/data.json', True, 'json: first file empty'),
(jsonA, jsonA, 'a/data.json', 'b/data.json', True, 'json: identical files'),
('{}', '{}', 'a/data.json', 'b/data.json', True, 'json: empty files'),
)
('{}', '{}', 'a/data.json', 'b/data.json', True, 'json: empty files'))
def print_hdr(hdr):
print('{a} {b} {c}'.format(

View file

@ -38,8 +38,7 @@ from mmgen.seedsplit import (
SeedShareList,
SeedShareLast,
SeedShareMaster,
SeedShareMasterJoining
)
SeedShareMasterJoining)
from mmgen.proto.btc.tw.unspent import BitcoinTwUnspentOutputs
from mmgen.tx.base import Base

View file

@ -70,8 +70,7 @@ from test.include.common import (
getrandhex,
end_msg,
init_coverage,
get_tmpfile,
)
get_tmpfile)
set_globals(cfg)
vmsg = cfg._util.vmsg