<commit_before>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"]<commit_msg>Fix #149: PostgresRangePartitioningStrategy should derive from PostgresPartitioningStrategy<commit_after>from .strategy import PostgresPartitioningStrategy


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


__all__ = ["PostgresRangePartitioningStrategy"]
{'fraction_non_alphanumeric': 0.07088122605363985, 'fraction_numerical': 0.0028735632183908046, 'mean_word_length': 4.805555555555555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6527477', 'n_tokens_mistral': 261, 'n_tokens_neox': 249, 'n_words': 83}