mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix: simplify _get_file_size annotation to Any
This commit is contained in:
parent
2e505be71d
commit
f3b53e3339
1 changed files with 2 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue