Coverage for src / rtflite / encoding / base.py: 83%
6 statements
« prev ^ index » next coverage.py v7.12.0, created at 2025-12-08 04:50 +0000
« prev ^ index » next coverage.py v7.12.0, created at 2025-12-08 04:50 +0000
1from abc import ABC, abstractmethod
2from typing import TYPE_CHECKING
4if TYPE_CHECKING:
5 from ..encode import RTFDocument
8class EncodingStrategy(ABC):
9 """Abstract base class for RTF encoding strategies."""
11 @abstractmethod
12 def encode(self, document: "RTFDocument") -> str:
13 """Encode the document using this strategy.
15 Args:
16 document: The RTF document to encode
18 Returns:
19 Complete RTF string
20 """
21 pass