Coverage for melissa/types/__init__.py: 68%
19 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-03-10 22:25 +0100
« prev ^ index » next coverage.py v7.6.12, created at 2025-03-10 22:25 +0100
1"""Interfaces for MixIn classes defined in server scripts."""
3import threading
4from typing import Protocol, Any, Union, List
7class QueueProtocol(Protocol):
8 not_empty: threading.Condition
9 mutex: threading.RLock
10 batch_size: int
11 _is_reception_over: bool
13 def _get_with_eviction(self, index: Union[List[int], int]) -> Any:
14 ...
16 def _get_without_eviction(self, index: Union[List[int], int]) -> Any:
17 ...
19 def _is_sampling_ready(self) -> bool:
20 ...
22 def _size(self) -> int:
23 ...
25 def _get_from_index(self, index: Union[List, int]) -> Any:
26 ...
28 def set_threshold(self, t: int) -> None:
29 ...