1
1
from types import ModuleType
2
2
from typing import Any
3
+ from typing import Iterable
4
+ from typing import Iterator
3
5
from typing import Optional
6
+ from typing import Tuple
7
+ from typing import TypeVar
4
8
5
- from . import operators as operators
6
- from . import roles as roles
7
- from . import visitors as visitors
8
- from .base import Options as Options
9
- from .traversals import HasCacheKey as HasCacheKey
10
- from .visitors import Visitable as Visitable
11
- from .. import exc as exc
12
- from .. import inspection as inspection
13
- from .. import util as util
14
- from ..util import collections_abc as collections_abc
9
+ from . import roles
10
+
11
+ _T = TypeVar ("_T" )
15
12
16
13
elements : ModuleType
17
14
lambdas : ModuleType
@@ -21,17 +18,19 @@ sqltypes: ModuleType
21
18
traversals : ModuleType
22
19
23
20
def expect (
24
- role : Any ,
21
+ role : _T ,
25
22
element : Any ,
26
23
apply_propagate_attrs : Optional [Any ] = ...,
27
24
argname : Optional [Any ] = ...,
28
25
** kw : Any ,
29
- ): ...
30
- def expect_as_key (role : Any , element : Any , ** kw : Any ): ...
31
- def expect_col_expression_collection (role : Any , expressions : Any ) -> None : ...
26
+ ) -> _T : ...
27
+ def expect_as_key (role : _T , element : Any , ** kw : Any ) -> _T : ...
28
+ def expect_col_expression_collection (
29
+ role : _T , expressions : Iterable [Any ]
30
+ ) -> Iterator [Tuple [_T , Any , str , Any ]]: ...
32
31
33
32
class RoleImpl :
34
- name : Any = ...
33
+ name : str = ...
35
34
def __init__ (self , role_class : Any ) -> None : ...
36
35
37
36
class _Deannotate : ...
@@ -78,7 +77,3 @@ class AnonymizedFromClauseImpl(StrictFromClauseImpl): ...
78
77
class DMLTableImpl (_SelectIsNotFrom , _NoTextCoercion , RoleImpl ): ...
79
78
class DMLSelectImpl (_NoTextCoercion , RoleImpl ): ...
80
79
class CompoundElementImpl (_NoTextCoercion , RoleImpl ): ...
81
-
82
- cls : Any
83
- name : Any
84
- impl : Any
0 commit comments