新增函数泛型注解

This commit is contained in:
2025-11-06 20:37:30 +08:00
parent 8121899d32
commit 4ba5bfdfee

View File

@@ -140,7 +140,7 @@ class Architecture:
return type_ in cls._RegisteredObjects
@classmethod
def Get(cls, type_:type) -> Any:
def Get[T](cls, type_:Typen[T]) -> T:
return cls._RegisteredObjects[type_]
@classmethod