Made dataclasses frozen and slotted for immutability and lower memory usage.
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (Python 3.12) (push) Successful in 20s
CI / Tests (Python 3.13) (push) Successful in 22s
CI / Tests (Python 3.14) (push) Successful in 50s
CI / Type Checking (push) Successful in 25s
CI / Spelling (push) Has been cancelled

This commit is contained in:
2026-03-26 13:33:20 -04:00
parent 0ddffe5e09
commit 8a45ba1f91
8 changed files with 29 additions and 29 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ if TYPE_CHECKING:
from .processing import ProcessingManager
@dataclass
@dataclass(slots=True)
class EditorSession:
"""A clip editor session."""
@@ -40,7 +40,7 @@ class EditorSession:
expiry_task: asyncio.Task[None] | None = None
@dataclass
@dataclass(slots=True)
class ModuleState:
"""Runtime state for the clips module."""
@@ -53,7 +53,7 @@ from .placeholder_handlers import HANDLERS, PlaceholderError
DEFAULT_MAX_DEPTH: int = 4
@dataclass
@dataclass(slots=True)
class TextNode:
"""A span of literal text that needs no further processing.
@@ -63,7 +63,7 @@ class TextNode:
text: str
@dataclass
@dataclass(slots=True)
class PlaceholderNode:
"""A ``$(name ...)`` placeholder expression.
@@ -82,7 +82,7 @@ class PlaceholderNode:
type Node = TextNode | PlaceholderNode
@dataclass
@dataclass(slots=True)
class PlaceholderContext:
"""Bundles the runtime state needed to resolve placeholders.