]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
remove redundant Float type check
authorDimitris Theodorou <dimitris.theodorou@gmail.com>
Mon, 12 Jan 2015 03:16:14 +0000 (04:16 +0100)
committerDimitris Theodorou <dimitris.theodorou@gmail.com>
Mon, 12 Jan 2015 03:16:14 +0000 (04:16 +0100)
alembic/ddl/postgresql.py

index 4c6e9d79fd57ff5ef0dd67c7fb8cc08ebd6b1093..ac3a5f48d137991ba1eb042abdf316c8d750f3a0 100644 (file)
@@ -4,7 +4,7 @@ from .. import compat
 from .base import compiles, alter_table, format_table_name, RenameTable
 from .impl import DefaultImpl
 from sqlalchemy.dialects.postgresql import INTEGER, BIGINT
-from sqlalchemy import text, Float, Numeric
+from sqlalchemy import text, Numeric
 import logging
 
 log = logging.getLogger(__name__)
@@ -36,7 +36,7 @@ class PostgresqlImpl(DefaultImpl):
             isinstance(metadata_column.server_default.arg,
                        compat.string_types) and \
                 not re.match(r"^'.+'$", rendered_metadata_default) and \
-                not isinstance(inspector_column.type, (Float, Numeric)):
+                not isinstance(inspector_column.type, Numeric):
                 # don't single quote if the column type is float/numeric,
                 # otherwise a comparison such as SELECT 5 = '5.0' will fail
             rendered_metadata_default = "'%s'" % rendered_metadata_default