[CHORE]: remove redundant-cast (#24807)

This commit is contained in:
willzhao
2025-09-01 14:05:32 +08:00
committed by GitHub
parent f11131f8b5
commit ffba341258
26 changed files with 54 additions and 90 deletions

View File

@@ -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('"'))