Browse Source

pylint: imports

The MMGen Project 5 months ago
parent
commit
4da5945eb3

+ 0 - 1
mmgen/altcoin/params.py

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

+ 1 - 1
mmgen/autosign.py

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

+ 0 - 1
mmgen/daemon.py

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

+ 1 - 1
mmgen/devtools.py

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

+ 1 - 1
mmgen/led.py

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

+ 1 - 1
mmgen/proto/btc/tw/rpc.py

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

+ 1 - 1
mmgen/tw/unspent.py

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

+ 1 - 1
mmgen/tw/view.py

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

+ 1 - 1
mmgen/util.py

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

+ 1 - 1
mmgen/wallet/base.py

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

+ 0 - 3
mmgen/xmrwallet.py

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