Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-berchet committed Jan 6, 2023
1 parent cbd100b commit 4ba4b34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions geoalchemy2/alembic_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions geoalchemy2/dialects/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion geoalchemy2/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ba4b34

Please sign in to comment.