fix: simplify _get_file_size annotation to Any

This commit is contained in:
Ishaan Jaffer 2026-03-23 11:00:51 -07:00
parent 2e505be71d
commit f3b53e3339

View file

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