Coverage for src/fluree_py/http/protocol/mixin/context.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-04-02 03:03 +0000

1from typing import Any, Generic, Protocol, TypeVar 

2 

3 

4class HasContextData(Protocol): 

5 """Protocol for objects that have context data.""" 

6 

7 context: dict[str, Any] | None 

8 

9 

10T = TypeVar("T", bound="HasContextData", covariant=True) 

11 

12 

13class SupportsContext(Generic[T], Protocol): 

14 """Protocol for objects that support context operations.""" 

15 

16 context: dict[str, Any] | None 

17 

18 def with_context(self, context: dict[str, Any]) -> T: ...