misc linter

This commit is contained in:
ed 2026-05-26 17:47:52 +00:00
parent f0f6933b4e
commit 62dc833273
4 changed files with 11 additions and 4 deletions

View file

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

View file

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

View file

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

View file

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