other linter nitpicks (not actually bugs)

This commit is contained in:
ed 2024-07-13 01:18:14 +02:00
parent f37187a041
commit 760ff2db72
4 changed files with 7 additions and 3 deletions

View file

@ -748,7 +748,7 @@ class HttpCli(object):
or ("; Trident/" in self.ua and not k304)
)
def _build_html_head(self, maybe_html: Any, kv: dict[str, Any]) -> bool:
def _build_html_head(self, maybe_html: Any, kv: dict[str, Any]) -> None:
html = str(maybe_html)
is_jinja = html[:2] in "%@%"
if is_jinja:
@ -3075,6 +3075,7 @@ class HttpCli(object):
logtail = ""
if ptop is not None:
ap_data = "<%s>" % (req_path,)
try:
dp, fn = os.path.split(req_path)
tnam = fn + ".PARTIAL"

View file

@ -361,7 +361,7 @@ class MDNS(MCast):
except:
pass
self.srv = {}
self.srv.clear()
def eat(self, buf: bytes, addr: tuple[str, int], sck: socket.socket) -> None:
cip = addr[0]

View file

@ -139,6 +139,9 @@ def au_unpk(
zil = [x for x in zil if x.filename.lower().split(".")[-1] == au]
fi = zf.open(zil[0])
else:
raise Exception("unknown compression %s" % (pk,))
with os.fdopen(fd, "wb") as fo:
while True:
buf = fi.read(32768)

View file

@ -188,7 +188,7 @@ class SSDPd(MCast):
except:
pass
self.srv = {}
self.srv.clear()
def eat(self, buf: bytes, addr: tuple[str, int]) -> None:
cip = addr[0]