Coverage for src/foapy/core/_tuple_mode.py: 100%
9 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-17 19:57 +0000
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-17 19:57 +0000
1class tuple_mode:
2 """
3 Tuple mode enumeration controlling how ``intervals_tuple`` shapes the boundary
4 intervals in an intervals chain into the final intervals tuple.
6 Examples
7 --------
9 ``` py linenums="1"
10 import foapy
12 print(foapy.tuple_mode.lossy) # 1
13 print(foapy.tuple_mode.normal) # 2
14 print(foapy.tuple_mode.redundant) # 3
15 ```
16 """
18 lossy: int = 1
19 """Drop all boundary intervals (first/last-occurrence distances)."""
21 normal: int = 2
22 """Keep all intervals as-is (one boundary interval per element)."""
24 redundant: int = 3
25 """Expand boundary intervals into leading + trailing components."""
27 def __new__(cls, *args, **kwargs):
28 raise TypeError(cls.__name__ + " cannot be instantiated.")