diff --git a/geoalchemy2/alembic_helpers.py b/geoalchemy2/alembic_helpers.py index 93babb8a..b4030b9b 100644 --- a/geoalchemy2/alembic_helpers.py +++ b/geoalchemy2/alembic_helpers.py @@ -464,9 +464,7 @@ def drop_geo_table(context, revision, op): """Replace the default DropTableOp by a geospatial-specific one.""" dialect = context.bind.dialect table = op.to_table() - gis_cols = _get_gis_cols( - table, (Geometry, Geography, Raster), dialect - ) + gis_cols = _get_gis_cols(table, (Geometry, Geography, Raster), dialect) if gis_cols: new_op = DropGeospatialTableOp(op.table_name, op.schema) diff --git a/geoalchemy2/dialects/sqlite.py b/geoalchemy2/dialects/sqlite.py index 0a1cc910..008e8531 100644 --- a/geoalchemy2/dialects/sqlite.py +++ b/geoalchemy2/dialects/sqlite.py @@ -158,9 +158,7 @@ def before_create(table, bind, **kw): current_indexes = set(table.indexes) for idx in current_indexes: for col in table.info["_saved_columns"]: - if ( - _check_spatial_type(col.type, Geometry, dialect) - ) and col in idx.columns.values(): + if (_check_spatial_type(col.type, Geometry, dialect)) and col in idx.columns.values(): table.indexes.remove(idx) if idx.name != _spatial_idx_name(table.name, col.name) or not getattr( col.type, "spatial_index", False diff --git a/geoalchemy2/types.py b/geoalchemy2/types.py index c4dac553..cbe2bafc 100644 --- a/geoalchemy2/types.py +++ b/geoalchemy2/types.py @@ -152,7 +152,7 @@ def __init__( "version 0.14", DeprecationWarning, ) - self.management = (management is True) + self.management = management is True self.use_typmod = use_typmod self.extended = self.as_binary == "ST_AsEWKB" self.nullable = nullable