@@ -16,7 +16,7 @@ from typing import TypeVar
1616from typing import Union
1717
1818from . import roles
19- from .schema import Column
19+ from .elements import ColumnElement
2020from .traversals import HasCacheKey
2121from .traversals import HasCopyInternals
2222from .visitors import ClauseVisitor
@@ -30,8 +30,8 @@ _T = TypeVar("_T")
3030_SC = TypeVar ("_SC" , bound = SingletonConstant )
3131_O = TypeVar ("_O" , bound = Options )
3232_E = TypeVar ("_E" , bound = Executable )
33- _C = TypeVar ("_C " , bound = Column [Any ])
34- _OC = TypeVar ("_OC " , bound = Column [Any ])
33+ _CE = TypeVar ("_CE " , bound = ColumnElement [Any ])
34+ _OCE = TypeVar ("_OCE " , bound = ColumnElement [Any ])
3535
3636coercions : ModuleType
3737elements : ModuleType
@@ -145,56 +145,58 @@ class SchemaEventTarget: ...
145145class SchemaVisitor (ClauseVisitor ):
146146 __traverse_options__ : Any = ...
147147
148- class ColumnCollection (Generic [_C ]):
148+ class ColumnCollection (Generic [_CE ]):
149149 def __init__ (
150- self , columns : Optional [Iterable [Tuple [str , _C ]]] = ...
150+ self , columns : Optional [Iterable [Tuple [str , _CE ]]] = ...
151151 ) -> None : ...
152- def keys (self ) -> List [_C ]: ...
152+ def keys (self ) -> List [_CE ]: ...
153153 def values (self ) -> List [str ]: ...
154- def items (self ) -> List [Tuple [str , _C ]]: ...
154+ def items (self ) -> List [Tuple [str , _CE ]]: ...
155155 def __bool__ (self ) -> bool : ...
156156 def __len__ (self ) -> int : ...
157- def __iter__ (self ) -> Iterator [_C ]: ...
158- def __getitem__ (self , key : str ) -> _C : ...
159- def __getattr__ (self , key : str ) -> _C : ...
157+ def __iter__ (self ) -> Iterator [_CE ]: ...
158+ def __getitem__ (self , key : str ) -> _CE : ...
159+ def __getattr__ (self , key : str ) -> _CE : ...
160160 def __contains__ (self , key : str ) -> bool : ...
161161 def compare (self , other : Any ) -> bool : ...
162162 def __eq__ (self , other : Any ) -> bool : ...
163163 @overload
164- def get (self , key : str ) -> Optional [_C ]: ...
164+ def get (self , key : str ) -> Optional [_CE ]: ...
165165 @overload
166- def get (self , key : str , default : _T ) -> Union [_C , _T ]: ...
167- def __setitem__ (self , key : str , value : _C ) -> None : ...
166+ def get (self , key : str , default : _T ) -> Union [_CE , _T ]: ...
167+ def __setitem__ (self , key : str , value : _CE ) -> None : ...
168168 def __delitem__ (self , key : str ) -> None : ...
169- def __setattr__ (self , key : str , obj : _C ) -> None : ...
169+ def __setattr__ (self , key : str , obj : _CE ) -> None : ...
170170 def clear (self ) -> None : ...
171- def remove (self , column : _C ) -> None : ...
171+ def remove (self , column : _CE ) -> None : ...
172172 def update (
173- self , iter_ : Union [Mapping [str , _C ], Iterable [Tuple [str , _C ]]]
173+ self , iter_ : Union [Mapping [str , _CE ], Iterable [Tuple [str , _CE ]]]
174174 ) -> None : ...
175175 __hash__ : Any = ...
176- def add (self , column : _C , key : Optional [str ] = ...) -> None : ...
177- def contains_column (self , col : Column [Any ]) -> bool : ...
178- def as_immutable (self ) -> ImmutableColumnCollection [_C ]: ...
176+ def add (self , column : _CE , key : Optional [str ] = ...) -> None : ...
177+ def contains_column (self , col : ColumnElement [Any ]) -> bool : ...
178+ def as_immutable (self ) -> ImmutableColumnCollection [_CE ]: ...
179179 def corresponding_column (
180- self , column : Column [Any ], require_embedded : bool = ...
181- ) -> Optional [_C ]: ...
182-
183- class DedupeColumnCollection (ColumnCollection [_C ]):
184- def add (self , column : _C , key : Optional [str ] = ...) -> None : ...
185- def extend (self , iter_ : Iterable [_C ]) -> None : ...
186- def remove (self , column : _C ) -> None : ...
187- def replace (self , column : _C ) -> None : ...
188-
189- class ImmutableColumnCollection (util .ImmutableContainer , ColumnCollection [_C ]):
190- def __init__ (self , collection : ColumnCollection [_C ]) -> None : ...
191- def add (self , column : _C , key : Optional [str ] = ...) -> NoReturn : ...
192- def extend (self , iter_ : Iterable [_C ]) -> NoReturn : ...
193- def remove (self , column : _C ) -> NoReturn : ...
194-
195- class ColumnSet (util .ordered_column_set [_C ]):
196- def contains_column (self , col : Column [Any ]) -> bool : ...
197- def extend (self , cols : Iterable [_C ]) -> None : ...
198- def __add__ (self , other : Iterable [_OC ]) -> List [Union [_C , _OC ]]: ... # type: ignore[override]
180+ self , column : ColumnElement [Any ], require_embedded : bool = ...
181+ ) -> Optional [_CE ]: ...
182+
183+ class DedupeColumnCollection (ColumnCollection [_CE ]):
184+ def add (self , column : _CE , key : Optional [str ] = ...) -> None : ...
185+ def extend (self , iter_ : Iterable [_CE ]) -> None : ...
186+ def remove (self , column : _CE ) -> None : ...
187+ def replace (self , column : _CE ) -> None : ...
188+
189+ class ImmutableColumnCollection (
190+ util .ImmutableContainer , ColumnCollection [_CE ]
191+ ):
192+ def __init__ (self , collection : ColumnCollection [_CE ]) -> None : ...
193+ def add (self , column : _CE , key : Optional [str ] = ...) -> NoReturn : ...
194+ def extend (self , iter_ : Iterable [_CE ]) -> NoReturn : ...
195+ def remove (self , column : _CE ) -> NoReturn : ...
196+
197+ class ColumnSet (util .ordered_column_set [_CE ]):
198+ def contains_column (self , col : ColumnElement [Any ]) -> bool : ...
199+ def extend (self , cols : Iterable [_CE ]) -> None : ...
200+ def __add__ (self , other : Iterable [_OCE ]) -> List [Union [_CE , _OCE ]]: ... # type: ignore[override]
199201 def __eq__ (self , other : Any ) -> Any : ...
200202 def __hash__ (self ) -> int : ... # type: ignore[override]
0 commit comments