]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Set correct type annotations for ColumnElement.cast
authorYurii Karabas <1998uriyyo@gmail.com>
Fri, 27 Jan 2023 09:50:32 +0000 (11:50 +0200)
committerGitHub <noreply@github.com>
Fri, 27 Jan 2023 09:50:32 +0000 (11:50 +0200)
lib/sqlalchemy/sql/elements.py

index 71d8cb2d329a39f2134a4334921554d3d376965c..c3f7b884ce2245d4b8a61e8543293e9efdc91aa5 100644 (file)
@@ -1641,7 +1641,7 @@ class ColumnElement(
             co._is_clone_of = selectable._is_clone_of.columns.get(key)
         return key, co
 
-    def cast(self, type_: TypeEngine[_T]) -> Cast[_T]:
+    def cast(self, type_: _TypeEngineArgument[_T]) -> Cast[_T]:
         """Produce a type cast, i.e. ``CAST(<expression> AS <type>)``.
 
         This is a shortcut to the :func:`_expression.cast` function.