ExactMatch, Contains, Regex, and JsonSchema are defined with manual __slots__ and __init__:
class ExactMatch(Validator):
__slots__ = ("expected", "case_sensitive")
def __init__(self, expected: str, case_sensitive: bool = True) -> None:
self.expected = expected
self.case_sensitive = case_sensitive
Every other data-holding class in the codebase — Metrics, RetryConfig, Prompt, TestResult, Summary, Report — uses @dataclass(frozen=True, slots=True). The validator classes were explicitly converted to __slots__-based form in #68, moving them away from the pattern used everywhere else. There is no documented reason for this asymmetry.
ExactMatch,Contains,Regex, andJsonSchemaare defined with manual__slots__and__init__:Every other data-holding class in the codebase —
Metrics,RetryConfig,Prompt,TestResult,Summary,Report— uses@dataclass(frozen=True, slots=True). The validator classes were explicitly converted to__slots__-based form in #68, moving them away from the pattern used everywhere else. There is no documented reason for this asymmetry.