@@ -9,7 +9,7 @@ from . import roles as roles
9
9
from . import traversals as traversals
10
10
from . import type_api as type_api
11
11
from .annotation import Annotated as Annotated
12
- from .annotation import SupportsWrappingAnnotations as SupportsWrappingAnnotations
12
+ from .annotation import SupportsWrappingAnnotations
13
13
from .base import Executable as Executable
14
14
from .base import HasMemoized as HasMemoized
15
15
from .base import Immutable as Immutable
@@ -27,6 +27,8 @@ from .. import exc as exc
27
27
from .. import inspection as inspection
28
28
from .. import util as util
29
29
30
+ _T = TypeVar ("_T" , bound = type_api .TypeEngine )
31
+
30
32
def collate (expression : Any , collation : Any ): ...
31
33
def between (
32
34
expr : Any , lower_bound : Any , upper_bound : Any , symmetric : bool = ...
@@ -64,8 +66,6 @@ class ClauseElement(
64
66
def __bool__ (self ) -> None : ...
65
67
__nonzero__ : Any = ...
66
68
67
- _T = TypeVar ("_T" )
68
-
69
69
class ColumnElement (
70
70
roles .ColumnArgumentOrKeyRole ,
71
71
roles .StatementOptionRole ,
@@ -79,7 +79,7 @@ class ColumnElement(
79
79
roles .DDLExpressionRole ,
80
80
operators .ColumnOperators ,
81
81
ClauseElement ,
82
- Generic [_T ]
82
+ Generic [_T ],
83
83
):
84
84
__visit_name__ : str = ...
85
85
primary_key : bool = ...
@@ -107,7 +107,7 @@ class WrapsColumnExpression:
107
107
@property
108
108
def anon_label (self ): ...
109
109
110
- class BindParameter (roles .InElementRole , ColumnElement ):
110
+ class BindParameter (roles .InElementRole , ColumnElement [ _T ] ):
111
111
__visit_name__ : str = ...
112
112
inherit_cache : bool = ...
113
113
key : Any = ...
@@ -171,15 +171,15 @@ class TextClause(
171
171
self , against : Optional [Any ] = ...
172
172
) -> Union [Grouping , TextClause ]: ...
173
173
174
- class Null (SingletonConstant , roles .ConstExprRole , ColumnElement ):
174
+ class Null (SingletonConstant , roles .ConstExprRole , ColumnElement [ _T ] ):
175
175
__visit_name__ : str = ...
176
176
def type (self ): ...
177
177
178
- class False_ (SingletonConstant , roles .ConstExprRole , ColumnElement ):
178
+ class False_ (SingletonConstant , roles .ConstExprRole , ColumnElement [ _T ] ):
179
179
__visit_name__ : str = ...
180
180
def type (self ): ...
181
181
182
- class True_ (SingletonConstant , roles .ConstExprRole , ColumnElement ):
182
+ class True_ (SingletonConstant , roles .ConstExprRole , ColumnElement [ _T ] ):
183
183
__visit_name__ : str = ...
184
184
def type (self ): ...
185
185
@@ -201,7 +201,7 @@ class ClauseList(
201
201
def append (self , clause : Any ) -> None : ...
202
202
def self_group (self , against : Optional [Any ] = ...) -> ClauseElement : ...
203
203
204
- class BooleanClauseList (ClauseList , ColumnElement ):
204
+ class BooleanClauseList (ClauseList , ColumnElement [ _T ] ):
205
205
__visit_name__ : str = ...
206
206
inherit_cache : bool = ...
207
207
def __init__ (self , * arg : Any , ** kw : Any ) -> None : ...
@@ -214,13 +214,13 @@ class BooleanClauseList(ClauseList, ColumnElement):
214
214
and_ : Any
215
215
or_ : Any
216
216
217
- class Tuple (ClauseList , ColumnElement ):
217
+ class Tuple (ClauseList , ColumnElement [ _T ] ):
218
218
__visit_name__ : str = ...
219
219
type : Any = ...
220
220
def __init__ (self , * clauses : Any , ** kw : Any ) -> None : ...
221
221
def self_group (self , against : Optional [Any ] = ...): ...
222
222
223
- class Case (ColumnElement ):
223
+ class Case (ColumnElement [ _T ] ):
224
224
__visit_name__ : str = ...
225
225
value : Any = ...
226
226
type : Any = ...
@@ -230,7 +230,7 @@ class Case(ColumnElement):
230
230
231
231
def literal_column (text : Any , type_ : Optional [Any ] = ...): ...
232
232
233
- class Cast (WrapsColumnExpression , ColumnElement ):
233
+ class Cast (WrapsColumnExpression , ColumnElement [ _T ] ):
234
234
__visit_name__ : str = ...
235
235
type : Any = ...
236
236
clause : Any = ...
@@ -239,7 +239,7 @@ class Cast(WrapsColumnExpression, ColumnElement):
239
239
@property
240
240
def wrapped_column_expression (self ): ...
241
241
242
- class TypeCoerce (WrapsColumnExpression , ColumnElement ):
242
+ class TypeCoerce (WrapsColumnExpression , ColumnElement [ _T ] ):
243
243
__visit_name__ : str = ...
244
244
type : Any = ...
245
245
clause : Any = ...
@@ -249,24 +249,24 @@ class TypeCoerce(WrapsColumnExpression, ColumnElement):
249
249
def wrapped_column_expression (self ): ...
250
250
def self_group (self , against : Optional [Any ] = ...): ...
251
251
252
- class Extract (ColumnElement ):
252
+ class Extract (ColumnElement [ _T ] ):
253
253
__visit_name__ : str = ...
254
254
type : Any = ...
255
255
field : Any = ...
256
256
expr : Any = ...
257
257
def __init__ (self , field : Any , expr : Any , ** kwargs : Any ) -> None : ...
258
258
259
- class _label_reference (ColumnElement ):
259
+ class _label_reference (ColumnElement [ _T ] ):
260
260
__visit_name__ : str = ...
261
261
element : Any = ...
262
262
def __init__ (self , element : Any ) -> None : ...
263
263
264
- class _textual_label_reference (ColumnElement ):
264
+ class _textual_label_reference (ColumnElement [ _T ] ):
265
265
__visit_name__ : str = ...
266
266
element : Any = ...
267
267
def __init__ (self , element : Any ) -> None : ...
268
268
269
- class UnaryExpression (ColumnElement ):
269
+ class UnaryExpression (ColumnElement [ _T ] ):
270
270
__visit_name__ : str = ...
271
271
operator : Any = ...
272
272
modifier : Any = ...
@@ -300,7 +300,7 @@ class AsBoolean(WrapsColumnExpression, UnaryExpression):
300
300
def wrapped_column_expression (self ): ...
301
301
def self_group (self , against : Optional [Any ] = ...) -> ClauseElement : ...
302
302
303
- class BinaryExpression (ColumnElement ):
303
+ class BinaryExpression (ColumnElement [ _T ] ):
304
304
__visit_name__ : str = ...
305
305
left : Any = ...
306
306
right : Any = ...
@@ -323,7 +323,7 @@ class BinaryExpression(ColumnElement):
323
323
def is_comparison (self ): ...
324
324
def self_group (self , against : Optional [Any ] = ...) -> ClauseElement : ...
325
325
326
- class Slice (ColumnElement ):
326
+ class Slice (ColumnElement [ _T ] ):
327
327
__visit_name__ : str = ...
328
328
start : Any = ...
329
329
stop : Any = ...
@@ -340,7 +340,7 @@ class GroupedElement(ClauseElement):
340
340
__visit_name__ : str = ...
341
341
def self_group (self , against : Optional [Any ] = ...) -> ClauseElement : ...
342
342
343
- class Grouping (GroupedElement , ColumnElement ):
343
+ class Grouping (GroupedElement , ColumnElement [ _T ] ):
344
344
element : Any = ...
345
345
type : Any = ...
346
346
def __init__ (self , element : Any ) -> None : ...
@@ -349,7 +349,7 @@ class Grouping(GroupedElement, ColumnElement):
349
349
RANGE_UNBOUNDED : Any
350
350
RANGE_CURRENT : Any
351
351
352
- class Over (ColumnElement ):
352
+ class Over (ColumnElement [ _T ] ):
353
353
__visit_name__ : str = ...
354
354
order_by : Any = ...
355
355
partition_by : Any = ...
@@ -367,7 +367,7 @@ class Over(ColumnElement):
367
367
def __reduce__ (self ): ...
368
368
def type (self ): ...
369
369
370
- class WithinGroup (ColumnElement ):
370
+ class WithinGroup (ColumnElement [ _T ] ):
371
371
__visit_name__ : str = ...
372
372
order_by : Any = ...
373
373
element : Any = ...
@@ -381,7 +381,7 @@ class WithinGroup(ColumnElement):
381
381
): ...
382
382
def type (self ): ...
383
383
384
- class FunctionFilter (ColumnElement ):
384
+ class FunctionFilter (ColumnElement [ _T ] ):
385
385
__visit_name__ : str = ...
386
386
criterion : Any = ...
387
387
func : Any = ...
@@ -397,7 +397,7 @@ class FunctionFilter(ColumnElement):
397
397
def self_group (self , against : Optional [Any ] = ...): ...
398
398
def type (self ): ...
399
399
400
- class Label (roles .LabeledColumnExprRole , ColumnElement ):
400
+ class Label (roles .LabeledColumnExprRole , ColumnElement [ _T ] ):
401
401
__visit_name__ : str = ...
402
402
name : Any = ...
403
403
key : Any = ...
@@ -413,7 +413,7 @@ class Label(roles.LabeledColumnExprRole, ColumnElement):
413
413
@property
414
414
def foreign_keys (self ): ...
415
415
416
- class NamedColumn (ColumnElement ):
416
+ class NamedColumn (ColumnElement [ _T ] ):
417
417
is_literal : bool = ...
418
418
table : Any = ...
419
419
def description (self ): ...
@@ -450,7 +450,7 @@ class TableValuedColumn(NamedColumn):
450
450
type : Any = ...
451
451
def __init__ (self , scalar_alias : Any , type_ : Any ) -> None : ...
452
452
453
- class CollationClause (ColumnElement ):
453
+ class CollationClause (ColumnElement [ _T ] ):
454
454
__visit_name__ : str = ...
455
455
collation : Any = ...
456
456
def __init__ (self , collation : Any ) -> None : ...
0 commit comments