diff --git a/alembic_postgresql_enum/operations/sync_enum_values.py b/alembic_postgresql_enum/operations/sync_enum_values.py index 6380b13..2efcd6d 100644 --- a/alembic_postgresql_enum/operations/sync_enum_values.py +++ b/alembic_postgresql_enum/operations/sync_enum_values.py @@ -204,8 +204,8 @@ def is_column_type_import_needed(self) -> bool: @alembic.autogenerate.render.renderers.dispatch_for(SyncEnumValuesOp) def render_sync_enum_value_op(autogen_context: AutogenContext, op: SyncEnumValuesOp): if op.is_column_type_import_needed: - autogen_context.imports.add("from alembic_postgresql_enum import ColumnType # type: ignore[attr-defined]") - autogen_context.imports.add("from alembic_postgresql_enum import TableReference # type: ignore[attr-defined]") + autogen_context.imports.add("from alembic_postgresql_enum import ColumnType") + autogen_context.imports.add("from alembic_postgresql_enum import TableReference") return ( f"op.sync_enum_values({op.schema!r}, {op.name!r}, {op.new_values!r}, # type: ignore[attr-defined]\n" diff --git a/tests/sync_enum_values/test_array_column.py b/tests/sync_enum_values/test_array_column.py index 0c6b87a..0e2af75 100644 --- a/tests/sync_enum_values/test_array_column.py +++ b/tests/sync_enum_values/test_array_column.py @@ -39,8 +39,8 @@ def test_add_new_enum_value_render_with_array(connection: "Connection"): autogenerate._render_migration_diffs(context, template_args) assert template_args["imports"] == ( - "from alembic_postgresql_enum import ColumnType # type: ignore[attr-defined]" - "\nfrom alembic_postgresql_enum import TableReference # type: ignore[attr-defined]" + "from alembic_postgresql_enum import ColumnType" + "\nfrom alembic_postgresql_enum import TableReference" ) assert (