mirror of
https://github.com/9001/copyparty.git
synced 2026-01-12 07:44:08 -07:00
more linter fixing
This commit is contained in:
parent
fd141c61b5
commit
65391a9d8c
|
|
@ -5394,7 +5394,7 @@ class HttpCli(object):
|
|||
"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 = []
|
||||
if self.conn.hsrv.tdls:
|
||||
|
|
@ -5945,7 +5945,7 @@ class HttpCli(object):
|
|||
if shr_dbv:
|
||||
# translate vpaths from share-target to share-url
|
||||
# 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))
|
||||
for v in ret:
|
||||
vp = v["vp"]
|
||||
|
|
@ -7377,7 +7377,7 @@ class HttpCli(object):
|
|||
ogh["og:site_name"] = zs
|
||||
|
||||
try:
|
||||
assert file # type: ignore # !rm
|
||||
assert file is not None # type: ignore # !rm
|
||||
zs1, zs2 = file["tags"]["res"].split("x")
|
||||
file["tags"][".resw"] = zs1
|
||||
file["tags"][".resh"] = zs2
|
||||
|
|
@ -7417,7 +7417,7 @@ class HttpCli(object):
|
|||
}
|
||||
|
||||
try:
|
||||
assert file # type: ignore # !rm
|
||||
assert file is not None # type: ignore # !rm
|
||||
for k, v in file["tags"].items():
|
||||
zs = "{{ %s }}" % (k,)
|
||||
title = title.replace(zs, str(v))
|
||||
|
|
@ -7434,7 +7434,7 @@ class HttpCli(object):
|
|||
|
||||
for tag, hname in tagmap.items():
|
||||
try:
|
||||
assert file # type: ignore # !rm
|
||||
assert file is not None # type: ignore # !rm
|
||||
v = file["tags"][tag]
|
||||
if not v:
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -2284,9 +2284,8 @@ def sanitize_to(fn: str, tl: dict[int, int]) -> str:
|
|||
|
||||
|
||||
def sanitize_vpath(vp: str) -> str:
|
||||
if not FNTL_OS:
|
||||
if not APTL_OS:
|
||||
return vp
|
||||
assert APTL_OS # type: ignore # !rm
|
||||
parts = vp.replace(os.sep, "/").split("/")
|
||||
ret = [sanitize_to(x, APTL_OS) for x in parts]
|
||||
return "/".join(ret)
|
||||
|
|
|
|||
Loading…
Reference in a new issue