pylint: imports

This commit is contained in:
The MMGen Project 2024-09-20 09:36:04 +00:00
commit 4da5945eb3
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
11 changed files with 8 additions and 13 deletions

View file

@ -27,7 +27,6 @@ altcoin.py - Constants for Bitcoin-derived altcoins
# NSR: 149/191 c/u, 63/('S'), 64/('S'|'T')
# NBT: 150/191 c/u, 25/('B'), 26/('B')
import sys
from collections import namedtuple
from ..cfg import gc

View file

@ -13,7 +13,7 @@ autosign: Auto-sign MMGen transactions, message files and XMR wallet output file
"""
import sys, os, asyncio
from stat import S_ISDIR,S_IWUSR,S_IRUSR
from stat import S_IWUSR, S_IRUSR
from pathlib import Path
from subprocess import run, PIPE, DEVNULL

View file

@ -24,7 +24,6 @@ import sys,os,time,importlib
from subprocess import run,PIPE,CompletedProcess
from collections import namedtuple
from .cfg import gc
from .base_obj import Lockable
from .color import set_vt100
from .util import msg,Msg_r,die,remove_dups,oneshot_warning,fmt_list

View file

@ -54,8 +54,8 @@ def Pexit(*args):
Pdie(*args,exit_val=0)
def print_stack_trace(message=None,fh_list=[],nl='\n',sep='\n ',trim=4):
import os
if not fh_list:
import os
fh_list.append(open(f'devtools.trace.{os.getpid()}','w'))
nl = ''
res = get_stack_trace(message,nl,sep,trim)

View file

@ -24,7 +24,7 @@ import sys, os, threading
from collections import namedtuple
from subprocess import run
from .util import msg, msg_r, fmt, die, have_sudo
from .util import msg, msg_r, die, have_sudo
from .color import blue, orange
class LEDControl:

View file

@ -13,7 +13,7 @@ proto.btc.tw.rpc: Bitcoin base protocol tracking wallet RPC classes
"""
from ....addr import CoinAddr
from ....util import die,msg,rmsg
from ....util import die, msg
from ....tw.shared import get_tw_label
from ....tw.rpc import TwRPC
from ....tw.ctl import label_addr_pair

View file

@ -20,7 +20,7 @@
tw.unspent: Tracking wallet unspent outputs class for the MMGen suite
"""
from ..util import msg,suf,fmt
from ..util import msg, suf
from ..obj import (
ImmutableAttr,
ListItemAttr,

View file

@ -23,7 +23,7 @@ tw.view: base class for tracking wallet view classes
import sys,time,asyncio
from collections import namedtuple
from ..cfg import gc,gv
from ..cfg import gv
from ..objmethods import MMGenObject
from ..obj import get_obj,MMGenIdx,MMGenList
from ..color import nocolor,yellow,green,red,blue

View file

@ -23,7 +23,7 @@ util: Frequently-used variables, classes and utility functions for the MMGen sui
import sys,os,time,re
from .color import red,yellow,green,blue,purple
from .cfg import gv,gc
from .cfg import gv
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'

View file

@ -15,7 +15,7 @@ wallet.base: wallet base class
import os
from ..util import msg,die
from ..color import yellow,orange
from ..color import orange
from ..objmethods import MMGenObject
from . import wallet_data,get_wallet_cls

View file

@ -42,7 +42,6 @@ from .util import (
async_run,
make_timestr,
make_chksum_N,
capfirst,
list_gen,
fmt_dict
)
@ -56,7 +55,6 @@ from .rpc import json_encoder
from .proto.xmr.rpc import MoneroRPCClient,MoneroWalletRPCClient
from .proto.xmr.daemon import MoneroWalletDaemon
from .ui import keypress_confirm
from .autosign import Autosign
from .tx.util import get_autosign_obj
xmrwallet_uargs = namedtuple('xmrwallet_uargs',[
@ -816,7 +814,6 @@ class MoneroWalletOps:
if not self.asi.device_inserted:
die(1,'Removable device not present!')
if self.do_umount:
import atexit
atexit.register(lambda: self.asi.do_umount())
self.asi.do_mount()
self.post_mount_action()