Update deprecated type hinting in vllm/compilation (#18072)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-05-13 08:32:48 -07:00
committed by GitHub
parent fc407a1425
commit 19324d660c
13 changed files with 70 additions and 69 deletions
+3 -3
View File
@@ -3,7 +3,7 @@
import abc
import operator
from abc import abstractmethod
from typing import Iterable, List, Tuple
from collections.abc import Iterable
from torch import fx
from torch._higher_order_ops.auto_functionalize import auto_functionalized
@@ -56,7 +56,7 @@ class MultiOutputMatch(abc.ABC):
raise NotImplementedError
@property
def nodes(self) -> List[fx.Node]:
def nodes(self) -> list[fx.Node]:
return self.match.nodes
@property
@@ -87,7 +87,7 @@ class MultiOutputMatch(abc.ABC):
return self.graph.inserting_after(last_node_in_match)
def insert_getitems(self, tuple_node: fx.Node,
indices: Iterable[int]) -> Tuple[fx.Node, ...]:
indices: Iterable[int]) -> tuple[fx.Node, ...]:
"""
Insert operator.getitem nodes to extract elements from a tuple node.