diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2022-02-13 20:37:12 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2022-02-13 20:37:12 +0000 |
commit | d6b3c82b0c329730bcaff42b4bb39dba83acb536 (patch) | |
tree | d6b7f744a35c8d89615eeb0504ee7a4193f95642 /lib/sqlalchemy/sql/_selectable_constructors.py | |
parent | 260ade78a70d51378de9e7b9456bfe6218859b6c (diff) | |
parent | e545298e35ea9f126054b337e4b5ba01988b29f7 (diff) | |
download | sqlalchemy-d6b3c82b0c329730bcaff42b4bb39dba83acb536.tar.gz |
Merge "establish mypy / typing approach for v2.0" into main
Diffstat (limited to 'lib/sqlalchemy/sql/_selectable_constructors.py')
-rw-r--r-- | lib/sqlalchemy/sql/_selectable_constructors.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/_selectable_constructors.py b/lib/sqlalchemy/sql/_selectable_constructors.py index 4b67c12f0..d3cf207da 100644 --- a/lib/sqlalchemy/sql/_selectable_constructors.py +++ b/lib/sqlalchemy/sql/_selectable_constructors.py @@ -6,11 +6,11 @@ # the MIT License: https://www.opensource.org/licenses/mit-license.php from typing import Any -from typing import Type from typing import Union from . import coercions from . import roles +from ._typing import _ColumnsClauseElement from .elements import ColumnClause from .selectable import Alias from .selectable import CompoundSelect @@ -21,6 +21,8 @@ from .selectable import Select from .selectable import TableClause from .selectable import TableSample from .selectable import Values +from ..util.typing import _LiteralStar +from ..util.typing import Literal def alias(selectable, name=None, flat=False): @@ -279,7 +281,9 @@ def outerjoin(left, right, onclause=None, full=False): return Join(left, right, onclause, isouter=True, full=full) -def select(*entities: Union[roles.ColumnsClauseRole, Type]) -> "Select": +def select( + *entities: Union[_LiteralStar, Literal[1], _ColumnsClauseElement] +) -> "Select": r"""Construct a new :class:`_expression.Select`. |