Update deprecated type hinting in vllm/compilation (#18072)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user