more linter fixing

This commit is contained in:
ed 2026-01-02 16:56:03 +00:00
parent fd141c61b5
commit 65391a9d8c
2 changed files with 6 additions and 7 deletions

View file

@ -5394,7 +5394,7 @@ class HttpCli(object):
"dbwt": None, "dbwt": None,
} }
assert vstate and vstate.items and vs # type: ignore # !rm assert vstate is not None and vstate.items and vs # type: ignore # !rm
dls = dl_list = [] dls = dl_list = []
if self.conn.hsrv.tdls: if self.conn.hsrv.tdls:
@ -5945,7 +5945,7 @@ class HttpCli(object):
if shr_dbv: if shr_dbv:
# translate vpaths from share-target to share-url # translate vpaths from share-target to share-url
# to satisfy access checks # to satisfy access checks
assert shr_vrem and shr_vrem.split # type: ignore # !rm assert shr_vrem is not None and shr_vrem.split # type: ignore # !rm
vp_shr, vp_vfs = vroots(self.vpath, vjoin(shr_dbv.vpath, shr_vrem)) vp_shr, vp_vfs = vroots(self.vpath, vjoin(shr_dbv.vpath, shr_vrem))
for v in ret: for v in ret:
vp = v["vp"] vp = v["vp"]
@ -7377,7 +7377,7 @@ class HttpCli(object):
ogh["og:site_name"] = zs ogh["og:site_name"] = zs
try: try:
assert file # type: ignore # !rm assert file is not None # type: ignore # !rm
zs1, zs2 = file["tags"]["res"].split("x") zs1, zs2 = file["tags"]["res"].split("x")
file["tags"][".resw"] = zs1 file["tags"][".resw"] = zs1
file["tags"][".resh"] = zs2 file["tags"][".resh"] = zs2
@ -7417,7 +7417,7 @@ class HttpCli(object):
} }
try: try:
assert file # type: ignore # !rm assert file is not None # type: ignore # !rm
for k, v in file["tags"].items(): for k, v in file["tags"].items():
zs = "{{ %s }}" % (k,) zs = "{{ %s }}" % (k,)
title = title.replace(zs, str(v)) title = title.replace(zs, str(v))
@ -7434,7 +7434,7 @@ class HttpCli(object):
for tag, hname in tagmap.items(): for tag, hname in tagmap.items():
try: try:
assert file # type: ignore # !rm assert file is not None # type: ignore # !rm
v = file["tags"][tag] v = file["tags"][tag]
if not v: if not v:
continue continue

View file

@ -2284,9 +2284,8 @@ def sanitize_to(fn: str, tl: dict[int, int]) -> str:
def sanitize_vpath(vp: str) -> str: def sanitize_vpath(vp: str) -> str:
if not FNTL_OS: if not APTL_OS:
return vp return vp
assert APTL_OS # type: ignore # !rm
parts = vp.replace(os.sep, "/").split("/") parts = vp.replace(os.sep, "/").split("/")
ret = [sanitize_to(x, APTL_OS) for x in parts] ret = [sanitize_to(x, APTL_OS) for x in parts]
return "/".join(ret) return "/".join(ret)