From: khashashin Date: Tue, 3 May 2022 20:00:59 +0000 (+0200) Subject: docs(types) Fix missing import from sqlalchemy (#7978) X-Git-Tag: rel_1_4_37~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5ca81697feedb2739453ff6c5bc6ec76ed58eb7;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git docs(types) Fix missing import from sqlalchemy (#7978) * docs(types) Fix missing import from sqlalchemy The sample code is missing the import of Enum from sqlalchemy, which might confuse the reader, since we are using another enum type from Python itself here. So it makes sense to clarify that here. * fix whitespaces Change-Id: I019bbed8a7278f60e7239160ea4c99ecd2519d3b Co-authored-by: Federico Caselli (cherry picked from commit f89a202d60215b13e3733a3ea950473962b3cf67) --- diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index 92aaf1c57d..306ac397df 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -1270,6 +1270,8 @@ class Enum(Emulated, String, SchemaType): a plain-string enumerated type:: import enum + from sqlalchemy import Enum + class MyEnum(enum.Enum): one = 1 two = 2