@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / fec347dee1
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

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

Signed-off-by: Zerohertz <ohg3417@gmail.com>

Hyogeun Oh (오효근) committed Sep 14, 2025 at 21:11 UTC fec347dee130a79d8a56390ffcb2dde2e480f6ca
1 file changed +6 -3
vllm/transformers_utils/s3_utils.py
+6 -3
@@ -2,10 +2,13 @@
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4 import fnmatch
5 -from typing import Any, Optional
5 +from typing import TYPE_CHECKING, Optional
6
7 from vllm.utils import PlaceholderModule
8
9 +if TYPE_CHECKING:
10 + from botocore.client import BaseClient
11 +
12 try:
13 import boto3
14 except ImportError:
@@ -26,7 +29,7 @@ def _filter_ignore(paths: list[str], patterns: list[str]) -> list[str]:
29 ]
30
31
29 -def glob(s3: Optional[Any] = None,
32 +def glob(s3: Optional["BaseClient"] = None,
33 path: str = "",
34 allow_pattern: Optional[list[str]] = None) -> list[str]:
35 """
@@ -51,7 +54,7 @@ def glob(s3: Optional[Any] = None,
54
55
56 def list_files(
54 - s3: Any,
57 + s3: "BaseClient",
58 path: str,
59 allow_pattern: Optional[list[str]] = None,
60 ignore_pattern: Optional[list[str]] = None