mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-01 21:07:01 +08:00
fix(types): guard nullable U115 download stream
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
15
tests/fixtures/architecture/mypy-baseline.json
vendored
15
tests/fixtures/architecture/mypy-baseline.json
vendored
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user