mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-10 18:36:31 +08:00
3.14: add annotationlib, update typing and inspect (#13985)
This commit is contained in:
@@ -367,3 +367,14 @@ else:
|
||||
from enum import Enum
|
||||
|
||||
class StrEnum(str, Enum): ...
|
||||
|
||||
# Objects that appear in annotations or in type expressions.
|
||||
# Similar to PEP 747's TypeForm but a little broader.
|
||||
AnnotationForm: TypeAlias = Any
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
from annotationlib import Format
|
||||
|
||||
# These return annotations, which can be arbitrary objects
|
||||
AnnotateFunc: TypeAlias = Callable[[Format], dict[str, AnnotationForm]]
|
||||
EvaluateFunc: TypeAlias = Callable[[Format], AnnotationForm]
|
||||
|
||||
Reference in New Issue
Block a user