[CHORE]: remove redundant-cast (#24807)
This commit is contained in:
parent
f11131f8b5
commit
ffba341258
26 changed files with 54 additions and 90 deletions
|
|
@ -3,7 +3,7 @@ import os
|
|||
import urllib.parse
|
||||
import uuid
|
||||
from collections.abc import Callable, Mapping, Sequence
|
||||
from typing import Any, cast
|
||||
from typing import Any
|
||||
|
||||
import httpx
|
||||
from sqlalchemy import select
|
||||
|
|
@ -258,7 +258,6 @@ def _get_remote_file_info(url: str):
|
|||
mime_type = ""
|
||||
|
||||
resp = ssrf_proxy.head(url, follow_redirects=True)
|
||||
resp = cast(httpx.Response, resp)
|
||||
if resp.status_code == httpx.codes.OK:
|
||||
if content_disposition := resp.headers.get("Content-Disposition"):
|
||||
filename = str(content_disposition.split("filename=")[-1].strip('"'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue