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:
|
||||
from .httpsrv import HttpSrv
|
||||
from .svchub import SvcHub
|
||||
|
||||
|
||||
class ExceptionalQueue(Queue, object):
|
||||
|
|
@ -50,6 +51,7 @@ class BrokerCli(object):
|
|||
for example resolving httpconn.* in httpcli -- see lines tagged #mypy404
|
||||
"""
|
||||
|
||||
hub: "SvcHub"
|
||||
log: "RootLogger"
|
||||
args: argparse.Namespace
|
||||
asrv: AuthSrv
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ except:
|
|||
HAVE_MUTAGEN = False
|
||||
|
||||
|
||||
def have_ff(name: str) -> bool:
|
||||
def have_ff(name: str) -> bytes:
|
||||
uname = name.upper()
|
||||
if os.environ.get("PRTY_NO_" + uname):
|
||||
return b""
|
||||
|
|
@ -55,7 +55,7 @@ def have_ff(name: str) -> bool:
|
|||
try:
|
||||
bcmd = (ebin or name).encode("utf-8")
|
||||
except:
|
||||
bcmd = ebin or name
|
||||
bcmd: bytes = ebin or name
|
||||
|
||||
if ANYWIN and not ebin:
|
||||
bcmd += b".exe"
|
||||
|
|
|
|||
|
|
@ -1477,7 +1477,12 @@ class SvcHub(object):
|
|||
continue
|
||||
zi = signame2int(zs)
|
||||
setattr(self, mem, zi)
|
||||
sigs.append(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)
|
||||
|
||||
for sig in sigs:
|
||||
signal.signal(sig, self.signal_handler)
|
||||
|
|
|
|||
|
|
@ -790,7 +790,7 @@ class ThumbSrv(object):
|
|||
)
|
||||
finally:
|
||||
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:
|
||||
self.wait4ram(0.6, tpath)
|
||||
|
|
|
|||
Loading…
Reference in a new issue