"""Sequencer pattern base class."""
import abc
from typing import TYPE_CHECKING, Any
if TYPE_CHECKING: # pragma: no cover
from text_lint.sequencers.bases.operator_base import SequencerBase
[Doku]
class SequencerPatternBase(abc.ABC):
"""Base pattern for incrementing sequencer instances."""
# pylint: disable=unused-argument
[Doku]
def adjust(self, offset: int) -> None:
"""Adjust the pattern based on inserted data.
:param offset: An index to adjust the pattern by.
"""
[Doku]
@abc.abstractmethod
def increment(self, sequencer: "SequencerBase[Any]") -> None:
"""Advance the index for the given sequencer instance.
:param sequencer: The sequencer instance to advance.
"""