mirror of
https://github.com/9001/copyparty.git
synced 2026-06-18 20:22:27 -06:00
misc linter
This commit is contained in:
parent
f0f6933b4e
commit
62dc833273
|
|
@ -16,6 +16,7 @@ if True: # pylint: disable=using-constant-test
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .httpsrv import HttpSrv
|
from .httpsrv import HttpSrv
|
||||||
|
from .svchub import SvcHub
|
||||||
|
|
||||||
|
|
||||||
class ExceptionalQueue(Queue, object):
|
class ExceptionalQueue(Queue, object):
|
||||||
|
|
@ -50,6 +51,7 @@ class BrokerCli(object):
|
||||||
for example resolving httpconn.* in httpcli -- see lines tagged #mypy404
|
for example resolving httpconn.* in httpcli -- see lines tagged #mypy404
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
hub: "SvcHub"
|
||||||
log: "RootLogger"
|
log: "RootLogger"
|
||||||
args: argparse.Namespace
|
args: argparse.Namespace
|
||||||
asrv: AuthSrv
|
asrv: AuthSrv
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ except:
|
||||||
HAVE_MUTAGEN = False
|
HAVE_MUTAGEN = False
|
||||||
|
|
||||||
|
|
||||||
def have_ff(name: str) -> bool:
|
def have_ff(name: str) -> bytes:
|
||||||
uname = name.upper()
|
uname = name.upper()
|
||||||
if os.environ.get("PRTY_NO_" + uname):
|
if os.environ.get("PRTY_NO_" + uname):
|
||||||
return b""
|
return b""
|
||||||
|
|
@ -55,7 +55,7 @@ def have_ff(name: str) -> bool:
|
||||||
try:
|
try:
|
||||||
bcmd = (ebin or name).encode("utf-8")
|
bcmd = (ebin or name).encode("utf-8")
|
||||||
except:
|
except:
|
||||||
bcmd = ebin or name
|
bcmd: bytes = ebin or name
|
||||||
|
|
||||||
if ANYWIN and not ebin:
|
if ANYWIN and not ebin:
|
||||||
bcmd += b".exe"
|
bcmd += b".exe"
|
||||||
|
|
|
||||||
|
|
@ -1477,6 +1477,11 @@ class SvcHub(object):
|
||||||
continue
|
continue
|
||||||
zi = signame2int(zs)
|
zi = signame2int(zs)
|
||||||
setattr(self, mem, zi)
|
setattr(self, mem, zi)
|
||||||
|
try:
|
||||||
|
sigs.append(signal.Signals(zi))
|
||||||
|
except:
|
||||||
|
t = "using unknown signal %r as %s"
|
||||||
|
self.log("root", t % (zi, mem), 3)
|
||||||
sigs.append(zi)
|
sigs.append(zi)
|
||||||
|
|
||||||
for sig in sigs:
|
for sig in sigs:
|
||||||
|
|
|
||||||
|
|
@ -790,7 +790,7 @@ class ThumbSrv(object):
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
if p and p.poll() is None:
|
if p and p.poll() is None:
|
||||||
p.kill(9)
|
p.kill()
|
||||||
|
|
||||||
def _conv_rawpy(self, abspath: str, tpath: str, fmt: str, vn: VFS) -> None:
|
def _conv_rawpy(self, abspath: str, tpath: str, fmt: str, vn: VFS) -> None:
|
||||||
self.wait4ram(0.6, tpath)
|
self.wait4ram(0.6, tpath)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue