fix(types): guard nullable U115 download stream

This commit is contained in:
jxxghp
2026-10-17 17:40:25 +08:00
parent a36c3d7de9
commit 7ea9beacd3
2 changed files with 14 additions and 3 deletions

View File

@@ -941,6 +941,8 @@ class U115Pan(StorageBase, metaclass=WeakSingleton):
with self._request_utils.get_stream(
download_url, raise_exception=True
) as r:
if r is None:
return None
r.raise_for_status()
downloaded_size = 0

View File

@@ -959,9 +959,18 @@
"union-attr": 5
},
"app/modules/filemanager/storages/u115.py": {
"assignment": 1,
"no-untyped-call": 1,
"override": 2
"arg-type": 16,
"assignment": 7,
"attr-defined": 1,
"call-overload": 17,
"empty-body": 2,
"no-any-return": 6,
"no-untyped-call": 3,
"no-untyped-def": 5,
"operator": 2,
"override": 2,
"type-arg": 8,
"union-attr": 32
},
"app/modules/filemanager/transhandler.py": {
"arg-type": 18,