[Misc] Improve s3_utils type hints with BaseClient (#24825)

Signed-off-by: Zerohertz <ohg3417@gmail.com>
This commit is contained in:
Hyogeun Oh (오효근) 2025-09-14 21:11:14 +09:00 committed by GitHub
parent cc3173ae98
commit fec347dee1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,10 +2,13 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import fnmatch
from typing import Any, Optional
from typing import TYPE_CHECKING, Optional
from vllm.utils import PlaceholderModule
if TYPE_CHECKING:
from botocore.client import BaseClient
try:
import boto3
except ImportError:
@ -26,7 +29,7 @@ def _filter_ignore(paths: list[str], patterns: list[str]) -> list[str]:
]
def glob(s3: Optional[Any] = None,
def glob(s3: Optional["BaseClient"] = None,
path: str = "",
allow_pattern: Optional[list[str]] = None) -> list[str]:
"""
@ -51,7 +54,7 @@ def glob(s3: Optional[Any] = None,
def list_files(
s3: Any,
s3: "BaseClient",
path: str,
allow_pattern: Optional[list[str]] = None,
ignore_pattern: Optional[list[str]] = None