diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-21 17:10:18 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-21 17:23:22 -0400 |
| commit | a782160de2e66ad6f6cb2630ddc16ced4da1c359 (patch) | |
| tree | ba6e55230eaae44597d19f6194319096147bf538 /lib/sqlalchemy/sql | |
| parent | 3329b7eba3be7d462bbc2a0e7022bd62a0ea6a93 (diff) | |
| download | sqlalchemy-a782160de2e66ad6f6cb2630ddc16ced4da1c359.tar.gz | |
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
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/sqltypes.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index 816423d1b..a73c61147 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -1324,15 +1324,15 @@ class Enum(Emulated, String, SchemaType): by that backend. :param \*enums: either exactly one PEP-435 compliant enumerated type - or one or more string or unicode enumeration labels. If unicode - labels are present, the `convert_unicode` flag is auto-enabled. + or one or more string labels. .. versionadded:: 1.1 a PEP-435 style enumerated class may be passed. :param convert_unicode: Enable unicode-aware bind parameter and - result-set processing for this Enum's data. This is set - automatically based on the presence of unicode label strings. + result-set processing for this Enum's data under Python 2 only. + Under Python 2, this is set automatically based on the presence of + unicode label strings. This flag will be removed in SQLAlchemy 2.0. :param create_constraint: defaults to False. When creating a non-native enumerated type, also build a CHECK constraint on the |
