Coverage for src / lexigram / contracts / core / disposable.py: 0%

5 statements  

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

1"""Async disposable protocol for Lexigram Framework.""" 

2 

3from __future__ import annotations 

4 

5from typing import Protocol, runtime_checkable 

6 

7 

8@runtime_checkable 

9class AsyncDisposableProtocol(Protocol): 

10 """Protocol for async resource cleanup. 

11 

12 Expected Behavior: 

13 - dispose: MUST be idempotent. 

14 - dispose: SHOULD NOT raise exceptions on error; log and continue cleanup. 

15 """ 

16 

17 async def dispose(self) -> None: ... 

18 

19 

20__all__ = ["AsyncDisposableProtocol"]