Coverage for melissa/types/__init__.py: 71%
14 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-09-22 10:36 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-09-22 10:36 +0000
1from typing import Protocol, Any, Union, List, TypeVar
4class GetProtocol(Protocol):
5 _is_reception_over: bool
7 def _get_with_eviction(self, index: Union[List[int], int]) -> Any:
8 ...
10 def _get_without_eviction(self, index: Union[List[int], int]) -> Any:
11 ...
14class ThresholdProtocol(Protocol):
15 threshold: int
17 def _size(self) -> int:
18 ...
20 def _is_sampling_ready(self) -> bool:
21 ...
24Threshold = TypeVar("Threshold", bound=ThresholdProtocol)