mirror of
				https://github.com/9001/copyparty.git
				synced 2025-11-04 05:43:17 +00:00 
			
		
		
		
	linter cleanup
This commit is contained in:
		@@ -186,7 +186,7 @@ def init_E(E: EnvParams) -> None:
 | 
			
		||||
 | 
			
		||||
        with open_binary("copyparty", "z.tar") as tgz:
 | 
			
		||||
            with tarfile.open(fileobj=tgz) as tf:
 | 
			
		||||
                tf.extractall(tdn)
 | 
			
		||||
                tf.extractall(tdn)  # nosec (archive is safe)
 | 
			
		||||
 | 
			
		||||
        return tdn
 | 
			
		||||
 | 
			
		||||
@@ -201,7 +201,7 @@ def init_E(E: EnvParams) -> None:
 | 
			
		||||
        E.mod = _unpack()
 | 
			
		||||
 | 
			
		||||
    if sys.platform == "win32":
 | 
			
		||||
        bdir = os.environ.get("APPDATA") or os.environ.get("TEMP")
 | 
			
		||||
        bdir = os.environ.get("APPDATA") or os.environ.get("TEMP") or "."
 | 
			
		||||
        E.cfg = os.path.normpath(bdir + "/copyparty")
 | 
			
		||||
    elif sys.platform == "darwin":
 | 
			
		||||
        E.cfg = os.path.expanduser("~/Library/Preferences/copyparty")
 | 
			
		||||
 
 | 
			
		||||
@@ -73,8 +73,8 @@ if True:  # pylint: disable=using-constant-test
 | 
			
		||||
if TYPE_CHECKING:
 | 
			
		||||
    from .svchub import SvcHub
 | 
			
		||||
 | 
			
		||||
zs = "avif,avifs,bmp,gif,heic,heics,heif,heifs,ico,j2p,j2k,jp2,jpeg,jpg,jpx,png,tga,tif,tiff,webp"
 | 
			
		||||
CV_EXTS = set(zs.split(","))
 | 
			
		||||
zsg = "avif,avifs,bmp,gif,heic,heics,heif,heifs,ico,j2p,j2k,jp2,jpeg,jpg,jpx,png,tga,tif,tiff,webp"
 | 
			
		||||
CV_EXTS = set(zsg.split(","))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Dbw(object):
 | 
			
		||||
 
 | 
			
		||||
@@ -296,11 +296,11 @@ REKOBO_LKEY = {k.lower(): v for k, v in REKOBO_KEY.items()}
 | 
			
		||||
pybin = sys.executable or ""
 | 
			
		||||
if EXE:
 | 
			
		||||
    pybin = ""
 | 
			
		||||
    for p in "python3 python".split():
 | 
			
		||||
    for zsg in "python3 python".split():
 | 
			
		||||
        try:
 | 
			
		||||
            p = shutil.which(p)
 | 
			
		||||
            if p:
 | 
			
		||||
                pybin = p
 | 
			
		||||
            zsg = shutil.which(zsg)
 | 
			
		||||
            if zsg:
 | 
			
		||||
                pybin = zsg
 | 
			
		||||
                break
 | 
			
		||||
        except:
 | 
			
		||||
            pass
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user