From 9c4267f2442145378922498ca735d96c8f4bca42 Mon Sep 17 00:00:00 2001 From: Yurii Karabas <1998uriyyo@gmail.com> Date: Sat, 28 Jan 2023 09:27:35 -0500 Subject: Set correct type annotations for ColumnElement.cast Fixes: #9156 ### Description ### Checklist This pull request is: - [ ] A documentation / typographical error fix - Good to go, no issue or tests are needed - [x] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #` in the commit message - please include tests. **Have a nice day!** Closes: #9157 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9157 Pull-request-sha: 321dac184ee0d317296a689d7c8e47bf1464bcce Change-Id: I99fe759a21de910f34bae3bb919e82cd08969e81 --- lib/sqlalchemy/sql/elements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 71d8cb2d3..c3f7b884c 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -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( AS )``. This is a shortcut to the :func:`_expression.cast` function. -- cgit v1.2.1