from abc import abstractmethod
from typing import Generator

from .range_partition import PostgresRangePartition


class PostgresRangePartitioningStrategy:
    """Base class for implementing a partitioning strategy for a range
    partitioned table."""

    @abstractmethod
    def to_create(
        self,
    ) -> Generator[PostgresRangePartition, None, None]:
        """Generates a list of partitions to be created."""

    @abstractmethod
    def to_delete(
        self,
    ) -> Generator[PostgresRangePartition, None, None]:
        """Generates a list of partitions to be deleted."""


__all__ = ["PostgresRangePartitioningStrategy"]

@@ -2,92 +2,61 @@
 rom 
-abc import abstractmethod%0Afrom typing import Generator%0A%0Afrom .range_partition import
+.strategy import PostgresPartitioningStrategy%0A%0A%0Aclass
  Pos
@@ -74,33 +74,36 @@
 artition
-%0A%0A%0Aclass 
+ingStrategy(
 Postgres
 RangePar
@@ -86,37 +86,32 @@
 trategy(Postgres
-Range
 PartitioningStra
@@ -114,16 +114,17 @@
 Strategy
+)
 :%0A    %22%22
@@ -219,348 +219,8 @@
 %22%22%0A%0A
-    @abstractmethod%0A    def to_create(%0A        self,%0A    ) -%3E Generator%5BPostgresRangePartition, None, None%5D:%0A        %22%22%22Generates a list of partitions to be created.%22%22%22%0A%0A    @abstractmethod%0A    def to_delete(%0A        self,%0A    ) -%3E Generator%5BPostgresRangePartition, None, None%5D:%0A        %22%22%22Generates a list of partitions to be deleted.%22%22%22%0A%0A
 %0A__a

Fix #149: PostgresRangePartitioningStrategy should derive from PostgresPartitioningStrategy