mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
linter cleanup
This commit is contained in:
parent
867d8ee49e
commit
b1359f039f
|
@ -186,7 +186,7 @@ def init_E(E: EnvParams) -> None:
|
||||||
|
|
||||||
with open_binary("copyparty", "z.tar") as tgz:
|
with open_binary("copyparty", "z.tar") as tgz:
|
||||||
with tarfile.open(fileobj=tgz) as tf:
|
with tarfile.open(fileobj=tgz) as tf:
|
||||||
tf.extractall(tdn)
|
tf.extractall(tdn) # nosec (archive is safe)
|
||||||
|
|
||||||
return tdn
|
return tdn
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ def init_E(E: EnvParams) -> None:
|
||||||
E.mod = _unpack()
|
E.mod = _unpack()
|
||||||
|
|
||||||
if sys.platform == "win32":
|
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")
|
E.cfg = os.path.normpath(bdir + "/copyparty")
|
||||||
elif sys.platform == "darwin":
|
elif sys.platform == "darwin":
|
||||||
E.cfg = os.path.expanduser("~/Library/Preferences/copyparty")
|
E.cfg = os.path.expanduser("~/Library/Preferences/copyparty")
|
||||||
|
|
|
@ -73,8 +73,8 @@ if True: # pylint: disable=using-constant-test
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .svchub import SvcHub
|
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"
|
zsg = "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(","))
|
CV_EXTS = set(zsg.split(","))
|
||||||
|
|
||||||
|
|
||||||
class Dbw(object):
|
class Dbw(object):
|
||||||
|
|
|
@ -296,11 +296,11 @@ REKOBO_LKEY = {k.lower(): v for k, v in REKOBO_KEY.items()}
|
||||||
pybin = sys.executable or ""
|
pybin = sys.executable or ""
|
||||||
if EXE:
|
if EXE:
|
||||||
pybin = ""
|
pybin = ""
|
||||||
for p in "python3 python".split():
|
for zsg in "python3 python".split():
|
||||||
try:
|
try:
|
||||||
p = shutil.which(p)
|
zsg = shutil.which(zsg)
|
||||||
if p:
|
if zsg:
|
||||||
pybin = p
|
pybin = zsg
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue