@@ -22,6 +22,7 @@ from .sqltypes import TableValueType
22
22
from .visitors import Traversible
23
23
from .visitors import TraversibleType
24
24
from .. import util
25
+ from ..engine import Dialect
25
26
from ..util import compat
26
27
27
28
BOOLEANTYPE : Boolean
@@ -71,14 +72,18 @@ class TypeEngine(Traversible, Generic[_T]):
71
72
should_evaluate_none : bool = ...
72
73
def evaluates_none (self : _TE ) -> _TE : ...
73
74
def copy (self : _TE , ** kw : Any ) -> _TE : ...
74
- def compare_against_backend (self , dialect : Any , conn_type : Any ) -> Any : ...
75
+ def compare_against_backend (
76
+ self , dialect : Dialect , conn_type : Any
77
+ ) -> Any : ...
75
78
def copy_value (self , value : _T ) -> _T : ...
76
79
def literal_processor (
77
- self , dialect : Any
80
+ self , dialect : Dialect
78
81
) -> Optional [_LiteralProcessor [_T ]]: ...
79
- def bind_processor (self , dialect : Any ) -> Optional [_BindProcessor [_T ]]: ...
82
+ def bind_processor (
83
+ self , dialect : Dialect
84
+ ) -> Optional [_BindProcessor [_T ]]: ...
80
85
def result_processor (
81
- self , dialect : Any , coltype : Any
86
+ self , dialect : Dialect , coltype : Any
82
87
) -> Optional [_ResultProcessor [_T ]]: ...
83
88
def column_expression (self , colexpr : Any ) -> Any : ...
84
89
def bind_expression (self , bindvalue : Any ) -> Any : ...
@@ -90,12 +95,12 @@ class TypeEngine(Traversible, Generic[_T]):
90
95
self , type_ : Type [TypeEngine [_U ]], dialect_name : str
91
96
) -> Variant [_U ]: ...
92
97
def as_generic (self , allow_nulltype : bool = ...) -> TypeEngine [Any ]: ...
93
- def dialect_impl (self , dialect : Any ) -> Type [Any ]: ...
98
+ def dialect_impl (self , dialect : Dialect ) -> Type [Any ]: ...
94
99
def adapt (self , __cls : Type [_U ], ** kw : Any ) -> _U : ...
95
100
def coerce_compared_value (
96
101
self , op : Any , value : Any
97
102
) -> TypeEngine [Any ]: ...
98
- def compile (self , dialect : Optional [Any ] = ...) -> Any : ...
103
+ def compile (self , dialect : Optional [Dialect ] = ...) -> Any : ...
99
104
100
105
class VisitableCheckKWArg (util .EnsureKWArgType , TraversibleType ): ...
101
106
@@ -130,20 +135,22 @@ class TypeDecorator(SchemaEventTarget, TypeEngine[_T]):
130
135
) -> ClauseElement : ...
131
136
@property
132
137
def comparator_factory (self ) -> Type [Comparator [TypeEngine [_T ]]]: ... # type: ignore[override]
133
- def type_engine (self , dialect : Any ) -> TypeEngine [Any ]: ...
134
- def load_dialect_impl (self , dialect : Any ) -> TypeEngine [Any ]: ...
138
+ def type_engine (self , dialect : Dialect ) -> TypeEngine [Any ]: ...
139
+ def load_dialect_impl (self , dialect : Dialect ) -> TypeEngine [Any ]: ...
135
140
def __getattr__ (self , key : Any ) -> Any : ...
136
141
def process_literal_param (
137
- self , value : Optional [_T ], dialect : Any
142
+ self , value : Optional [_T ], dialect : Dialect
138
143
) -> str : ...
139
- def process_bind_param (self , value : Optional [_T ], dialect : Any ) -> Any : ...
144
+ def process_bind_param (
145
+ self , value : Optional [_T ], dialect : Dialect
146
+ ) -> Any : ...
140
147
def process_result_value (
141
- self , value : Any , dialect : Any
148
+ self , value : Any , dialect : Dialect
142
149
) -> Optional [_T ]: ...
143
- def literal_processor (self , dialect : Any ) -> _LiteralProcessor [_T ]: ...
144
- def bind_processor (self , dialect : Any ) -> _BindProcessor [_T ]: ...
150
+ def literal_processor (self , dialect : Dialect ) -> _LiteralProcessor [_T ]: ...
151
+ def bind_processor (self , dialect : Dialect ) -> _BindProcessor [_T ]: ...
145
152
def result_processor (
146
- self , dialect : Any , coltype : Any
153
+ self , dialect : Dialect , coltype : Any
147
154
) -> _ResultProcessor [_T ]: ...
148
155
def bind_expression (self , bindparam : Any ) -> Any : ...
149
156
def column_expression (self , column : Any ) -> Any : ...
@@ -163,7 +170,7 @@ class Variant(TypeDecorator[_T]):
163
170
def coerce_compared_value (
164
171
self : _VT , operator : Any , value : Any
165
172
) -> Union [_VT , TypeEngine [Any ]]: ...
166
- def load_dialect_impl (self , dialect : Any ) -> TypeEngine [Any ]: ...
173
+ def load_dialect_impl (self , dialect : Dialect ) -> TypeEngine [Any ]: ...
167
174
def with_variant (
168
175
self , type_ : Type [TypeEngine [_U ]], dialect_name : str
169
176
) -> Variant [_U ]: ...
0 commit comments