From 7e4b1861c302ad7a5f3599102cff4fde18ce2044 Mon Sep 17 00:00:00 2001 From: Varun Sundar Rabindranath Date: Fri, 3 Oct 2025 03:00:33 -0400 Subject: [PATCH] [Misc] Remove typing.List (#26150) Signed-off-by: Varun Sundar Rabindranath Co-authored-by: Varun Sundar Rabindranath Signed-off-by: yewentao256 --- vllm/model_executor/layers/fused_moe/fused_moe.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/vllm/model_executor/layers/fused_moe/fused_moe.py b/vllm/model_executor/layers/fused_moe/fused_moe.py index 0fd1b60f3bdfe..49f278c72007f 100644 --- a/vllm/model_executor/layers/fused_moe/fused_moe.py +++ b/vllm/model_executor/layers/fused_moe/fused_moe.py @@ -4,9 +4,6 @@ import functools import json import os -# torch.compile needs typing.List. It will fail torch.library.infer_schema -# otherwise -from typing import List # noqa: UP035 from typing import Any, Callable, Optional, Union import torch @@ -1229,7 +1226,7 @@ def inplace_fused_experts( w2_zp: Optional[torch.Tensor] = None, a1_scale: Optional[torch.Tensor] = None, a2_scale: Optional[torch.Tensor] = None, - block_shape: Optional[List[int]] = None, #noqa: UP006 + block_shape: Optional[list[int]] = None, w1_bias: Optional[torch.Tensor] = None, w2_bias: Optional[torch.Tensor] = None, ) -> None: @@ -1263,7 +1260,7 @@ def inplace_fused_experts_fake( w2_zp: Optional[torch.Tensor] = None, a1_scale: Optional[torch.Tensor] = None, a2_scale: Optional[torch.Tensor] = None, - block_shape: Optional[List[int]] = None, #noqa: UP006 + block_shape: Optional[list[int]] = None, w1_bias: Optional[torch.Tensor] = None, w2_bias: Optional[torch.Tensor] = None, ) -> None: @@ -1302,7 +1299,7 @@ def outplace_fused_experts( w2_zp: Optional[torch.Tensor] = None, a1_scale: Optional[torch.Tensor] = None, a2_scale: Optional[torch.Tensor] = None, - block_shape: Optional[List[int]] = None, #noqa: UP006 + block_shape: Optional[list[int]] = None, w1_bias: Optional[torch.Tensor] = None, w2_bias: Optional[torch.Tensor] = None, ) -> torch.Tensor: