From f89a202d60215b13e3733a3ea950473962b3cf67 Mon Sep 17 00:00:00 2001 From: khashashin Date: Tue, 3 May 2022 22:00:59 +0200 Subject: 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 --- lib/sqlalchemy/sql/sqltypes.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index d2d5e4e87..4b0b408f7 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -1183,6 +1183,8 @@ class Enum(String, SchemaType, Emulated, TypeEngine[Union[str, enum.Enum]]): a plain-string enumerated type:: import enum + from sqlalchemy import Enum + class MyEnum(enum.Enum): one = 1 two = 2 -- cgit v1.2.1