]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add support for Boolean, Enum
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 21 Mar 2021 21:10:18 +0000 (17:10 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 21 Mar 2021 21:23:22 +0000 (17:23 -0400)
commita782160de2e66ad6f6cb2630ddc16ced4da1c359
treeba6e55230eaae44597d19f6194319096147bf538
parent3329b7eba3be7d462bbc2a0e7022bd62a0ea6a93
Add support for Boolean, Enum

Fixed bug in Mypy plugin where the Python type detection
for the :class:`_sqltypes.Boolean` column type would produce
an exception; additionally implemented support for :class:`_sqltypes.Enum`,
including detection of a string-based enum vs. use of Python ``enum.Enum``.

Fixes: #6109
Change-Id: I25e546ea2f50d90be2d6fec303976d82849a3d31
lib/sqlalchemy/ext/mypy/decl_class.py
lib/sqlalchemy/sql/sqltypes.py
test/ext/mypy/files/boolean_col.py [new file with mode: 0644]
test/ext/mypy/files/enum_col.py [new file with mode: 0644]