|
1 | 1 | from typing import Any
|
| 2 | +from typing import Dict |
| 3 | +from typing import Tuple |
| 4 | +from typing import Type |
| 5 | +from typing import TypeVar |
2 | 6 |
|
3 |
| -from . import operators as operators |
4 |
| -from .base import HasCacheKey as HasCacheKey |
5 |
| -from .traversals import anon_map as anon_map |
6 |
| -from .visitors import InternalTraversal as InternalTraversal |
7 |
| -from .. import util as util |
| 7 | +from .. import util |
8 | 8 |
|
9 |
| -EMPTY_ANNOTATIONS: Any |
| 9 | +_A = TypeVar("_A", bound=Annotated) |
| 10 | +_T = TypeVar("_T") |
| 11 | + |
| 12 | +EMPTY_ANNOTATIONS: util.immutabledict[None, None] |
10 | 13 |
|
11 | 14 | class SupportsAnnotations: ...
|
12 | 15 | class SupportsCloneAnnotations(SupportsAnnotations): ...
|
13 | 16 | class SupportsWrappingAnnotations(SupportsAnnotations): ...
|
14 | 17 |
|
15 | 18 | class Annotated:
|
16 |
| - def __new__(cls, *args: Any): ... |
17 |
| - __dict__: Any = ... |
| 19 | + def __new__(cls: Type[_T], *args: Any) -> _T: ... |
| 20 | + __dict__: Dict[Any, Any] = ... |
18 | 21 | def __init__(self, element: Any, values: Any) -> None: ...
|
19 |
| - def __reduce__(self): ... |
20 |
| - def __hash__(self) -> Any: ... |
21 |
| - def __eq__(self, other: Any) -> Any: ... |
| 22 | + def __reduce__(self: _A) -> Tuple[Type[_A], Tuple[Any, Any]]: ... |
| 23 | + def __hash__(self) -> int: ... |
| 24 | + def __eq__(self, other: Any) -> bool: ... |
22 | 25 | @property
|
23 |
| - def entity_namespace(self): ... |
| 26 | + def entity_namespace(self) -> Any: ... |
24 | 27 |
|
25 |
| -annotated_classes: Any |
| 28 | +annotated_classes: Dict[Type[Any], Any] |
0 commit comments