[Build] Cython compilation support fix (#14296)

Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>
This commit is contained in:
Gregory Shtrasberg
2025-03-24 23:37:54 +00:00
committed by GitHub
parent 23fdab00a8
commit 8279201ce6
6 changed files with 46 additions and 6 deletions
+3 -3
View File
@@ -37,7 +37,7 @@ from collections.abc import (AsyncGenerator, Awaitable, Generator, Hashable,
from dataclasses import dataclass, field
from functools import cache, lru_cache, partial, wraps
from typing import (TYPE_CHECKING, Any, Callable, Generic, Literal, NamedTuple,
Optional, TypeVar, Union)
Optional, Type, TypeVar, Union)
from uuid import uuid4
import cloudpickle
@@ -1544,9 +1544,9 @@ class LazyDict(Mapping[str, T], Generic[T]):
return len(self._factory)
class ClassRegistry(UserDict[type[T], _V]):
class ClassRegistry(UserDict[Type[T], _V]):
def __getitem__(self, key: type[T]) -> _V:
def __getitem__(self, key: Type[T]) -> _V:
for cls in key.mro():
if cls in self.data:
return self.data[cls]