@@ -4,11 +4,11 @@ from typing import Callable
4
4
from typing import Generic
5
5
from typing import Mapping
6
6
from typing import Optional
7
- from typing import Text
8
7
from typing import Tuple
9
8
from typing import Type
10
9
from typing import TypeVar
11
10
from typing import Union
11
+
12
12
from typing_extensions import Protocol
13
13
14
14
from . import operators as operators
@@ -68,24 +68,30 @@ class TypeEngine(Traversible, Generic[_T]):
68
68
should_evaluate_none : bool = ...
69
69
def evaluates_none (self : _TE ) -> _TE : ...
70
70
def copy (self : _TE , ** kw : Any ) -> _TE : ...
71
- def compare_against_backend (
72
- self , dialect : Any , conn_type : Any
73
- ) -> Any : ...
71
+ def compare_against_backend (self , dialect : Any , conn_type : Any ) -> Any : ...
74
72
def copy_value (self , value : _T ) -> _T : ...
75
- def literal_processor (self , dialect : Any ) -> Optional [_LiteralProcessor [_T ]]: ...
73
+ def literal_processor (
74
+ self , dialect : Any
75
+ ) -> Optional [_LiteralProcessor [_T ]]: ...
76
76
def bind_processor (self , dialect : Any ) -> Optional [_BindProcessor [_T ]]: ...
77
- def result_processor (self , dialect : Any , coltype : Any ) -> Optional [_ResultProcessor [_T ]]: ...
77
+ def result_processor (
78
+ self , dialect : Any , coltype : Any
79
+ ) -> Optional [_ResultProcessor [_T ]]: ...
78
80
def column_expression (self , colexpr : Any ) -> Any : ...
79
81
def bind_expression (self , bindvalue : Any ) -> Any : ...
80
82
def compare_values (self , x : Any , y : Any ) -> bool : ...
81
83
def get_dbapi_type (self , dbapi : Any ) -> Any : ...
82
84
@property
83
85
def python_type (self ) -> Type [_T ]: ...
84
- def with_variant (self , type_ : Type [TypeEngine [_U ]], dialect_name : str ) -> Variant [_U ]: ...
86
+ def with_variant (
87
+ self , type_ : Type [TypeEngine [_U ]], dialect_name : str
88
+ ) -> Variant [_U ]: ...
85
89
def as_generic (self , allow_nulltype : bool = ...) -> TypeEngine [Any ]: ...
86
90
def dialect_impl (self , dialect : Any ) -> Type [Any ]: ...
87
91
def adapt (self , __cls : Type [_U ], ** kw : Any ) -> _U : ...
88
- def coerce_compared_value (self , op : Any , value : Any ) -> TypeEngine [Any ]: ...
92
+ def coerce_compared_value (
93
+ self , op : Any , value : Any
94
+ ) -> TypeEngine [Any ]: ...
89
95
def compile (self , dialect : Optional [Any ] = ...) -> Any : ...
90
96
91
97
class VisitableCheckKWArg (util .EnsureKWArgType , TraversibleType ): ...
@@ -103,7 +109,9 @@ class NativeForEmulated:
103
109
@classmethod
104
110
def adapt_native_to_emulated (cls , impl : Any , ** kw : Any ) -> Any : ...
105
111
@classmethod
106
- def adapt_emulated_to_native (cls : Type [_NFE ], impl : Any , ** kw : Any ) -> _NFE : ...
112
+ def adapt_emulated_to_native (
113
+ cls : Type [_NFE ], impl : Any , ** kw : Any
114
+ ) -> _NFE : ...
107
115
108
116
class TypeDecorator (SchemaEventTarget , TypeEngine [_T ]):
109
117
__visit_name__ : str = ...
@@ -118,12 +126,18 @@ class TypeDecorator(SchemaEventTarget, TypeEngine[_T]):
118
126
def type_engine (self , dialect : Any ) -> TypeEngine [Any ]: ...
119
127
def load_dialect_impl (self , dialect : Any ) -> TypeEngine [Any ]: ...
120
128
def __getattr__ (self , key : Any ) -> Any : ...
121
- def process_literal_param (self , value : Optional [_T ], dialect : Any ) -> str : ...
129
+ def process_literal_param (
130
+ self , value : Optional [_T ], dialect : Any
131
+ ) -> str : ...
122
132
def process_bind_param (self , value : Optional [_T ], dialect : Any ) -> Any : ...
123
- def process_result_value (self , value : Any , dialect : Any ) -> Optional [_T ]: ...
133
+ def process_result_value (
134
+ self , value : Any , dialect : Any
135
+ ) -> Optional [_T ]: ...
124
136
def literal_processor (self , dialect : Any ) -> _LiteralProcessor [_T ]: ...
125
137
def bind_processor (self , dialect : Any ) -> _BindProcessor [_T ]: ...
126
- def result_processor (self , dialect : Any , coltype : Any ) -> _ResultProcessor [_T ]: ...
138
+ def result_processor (
139
+ self , dialect : Any , coltype : Any
140
+ ) -> _ResultProcessor [_T ]: ...
127
141
def bind_expression (self , bindparam : Any ) -> Any : ...
128
142
def column_expression (self , column : Any ) -> Any : ...
129
143
def coerce_compared_value (self , op : Any , value : Any ) -> Any : ...
@@ -136,10 +150,16 @@ class TypeDecorator(SchemaEventTarget, TypeEngine[_T]):
136
150
class Variant (TypeDecorator [_T ]):
137
151
impl : TypeEngine [Any ] = ...
138
152
mapping : Mapping [str , TypeEngine [Any ]] = ...
139
- def __init__ (self , base : Any , mapping : Mapping [str , TypeEngine [Any ]]) -> None : ...
140
- def coerce_compared_value (self : _VT , operator : Any , value : Any ) -> Union [_VT , TypeEngine [Any ]]: ...
153
+ def __init__ (
154
+ self , base : Any , mapping : Mapping [str , TypeEngine [Any ]]
155
+ ) -> None : ...
156
+ def coerce_compared_value (
157
+ self : _VT , operator : Any , value : Any
158
+ ) -> Union [_VT , TypeEngine [Any ]]: ...
141
159
def load_dialect_impl (self , dialect : Any ) -> TypeEngine [Any ]: ...
142
- def with_variant (self , type_ : Type [TypeEngine [_U ]], dialect_name : str ) -> Variant [_U ]: ...
160
+ def with_variant (
161
+ self , type_ : Type [TypeEngine [_U ]], dialect_name : str
162
+ ) -> Variant [_U ]: ...
143
163
@property
144
164
def comparator_factory (self ) -> Type [Any ]: ... # type: ignore[override]
145
165
0 commit comments