[CI] Bump mypy version (#34950)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2026-03-04 20:55:11 +00:00
committed by GitHub
parent 7eca859110
commit 17dc9c7fc9
13 changed files with 90 additions and 61 deletions

View File

@@ -3,11 +3,11 @@
import os
from collections.abc import Callable
from typing import TYPE_CHECKING, Any, Literal
from typing import TYPE_CHECKING, Any, Literal, overload
import torch
from pydantic import Field, field_validator, model_validator
from torch.distributed import ProcessGroup, ReduceOp
from torch.distributed import ProcessGroup, ReduceOp, Store
from typing_extensions import Self
import vllm.envs as envs
@@ -507,7 +507,17 @@ class ParallelConfig:
def get_next_stateless_eplb_group_port(self) -> list[int]:
return self._stateless_eplb_group_port_list.pop()
def stateless_init_dp_group(self, return_store: bool = False) -> ProcessGroup:
@overload
def stateless_init_dp_group(
self, return_store: Literal[False] = ...
) -> ProcessGroup: ...
@overload
def stateless_init_dp_group(
self, return_store: Literal[True] = ...
) -> tuple[ProcessGroup, Store]: ...
def stateless_init_dp_group(
self, return_store: bool = False
) -> ProcessGroup | tuple[ProcessGroup, Store]:
# NOTE: In high-concurrency scenarios multiple processes
# can pick the same (currently free) port through a race
# condition when calling `get_open_port()`. When the first