Skip to content

Commit

Permalink
Add "encoded" property to SequenceType (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
cariad authored Oct 11, 2021
1 parent a8d4495 commit 803d439
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ansiscape/types/sequence_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
class SequenceType(ABC):
"""A sequence of strings, formatting interpretations and sub-sequences."""

@abstractmethod
def encoded(self) -> str:
"""
Encodes the sequence into a single string with embedded escape codes.
"""

@abstractmethod
def extend(self, *parts: SequencePart) -> None:
"""Extends this sequence."""
Expand Down

0 comments on commit 803d439

Please sign in to comment.