From f3b53e33392e4f4d7c10503a34ddfd5006dbc2dc Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Mon, 23 Mar 2026 11:00:51 -0700 Subject: [PATCH] fix: simplify _get_file_size annotation to Any --- .../proxy/openai_files_endpoint/test_files_endpoint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py b/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py index 937645c73fe..0f3f6e8cc33 100644 --- a/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py +++ b/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py @@ -1,7 +1,7 @@ import json import os import sys -from typing import Any, Union +from typing import Any from unittest.mock import ANY import pytest @@ -24,7 +24,7 @@ from litellm.types.llms.openai import OpenAIFileObject client = TestClient(app) -def _get_file_size(file_content: Union[bytes, Any]) -> int: +def _get_file_size(file_content: Any) -> int: """Return file size without loading IO objects fully into memory.""" if hasattr(file_content, "read") and hasattr(file_content, "seek"): pos = file_content.tell()