Coverage for src/foapy/core/_binding.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-05-17 20:45 +0000

1class binding: 

2 """ 

3 Binding enumeration used to determinate the direction of interval extraction. 

4 

5 Examples 

6 ---------- 

7 

8 See [foapy.intervals()][foapy.intervals] function for code examples using bindings. 

9 

10 === "binding.start" 

11 

12 | | b | a | b | c | b | 

13 |:-------:|:--:|:--:|:--:|:--:|:-:| 

14 | b | 1 | -> | 2 | -> | 2 | 

15 | a | -> | 2 | | | | 

16 | c | -> | -> | -> | 4 | | 

17 | result | 1 | 2 | 2 | 4 | 2 | 

18 

19 === "binding.end" 

20 

21 | | b | a | b | c | b | 

22 |:-------:|:--:|:--:|:--:|:--:|:--:| 

23 | b | 2 | <- | 2 | <- | 1 | 

24 | a | | 4 | <- | <- | <- | 

25 | c | | | | 2 | <- | 

26 | result | 2 | 4 | 2 | 2 | 1 | 

27 

28 

29 """ # noqa: E501 

30 

31 start: int = 1 

32 """ 

33 To sequence start (left-to-right direction). 

34 """ 

35 

36 end: int = 2 

37 """ 

38 To sequence end (right-to-left direction). 

39 """