Coverage for src / lexigram / contracts / lifecycle / validatable.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-08-15 18:58 +0800

1from __future__ import annotations 

2 

3from typing import Any, Protocol, runtime_checkable 

4 

5 

6@runtime_checkable 

7class ValidatableProtocol(Protocol): 

8 """Protocol for data validation.""" 

9 

10 async def validate_record( 

11 self, 

12 record: dict[str, Any], 

13 operation: str = "create", 

14 ) -> dict[str, Any]: ... 

15 

16 def get_validation_rules(self) -> dict[str, Any]: ... 

17 

18 

19__all__ = ["ValidatableProtocol"]