Coverage for controller / path_protocol.py: 100.00%

16 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-07 00:07 +0000

1from typing import Iterator, Protocol, runtime_checkable 

2 

3 

4@runtime_checkable 

5class PathLike(Protocol): 

6 """Protocol defining the path operations required by the controller.""" 

7 

8 @property 

9 def suffix(self) -> str: ... 

10 

11 @property 

12 def stem(self) -> str: ... 

13 

14 @property 

15 def name(self) -> str: ... 

16 

17 def exists(self) -> bool: ... 

18 

19 def is_dir(self) -> bool: ... 

20 

21 def iterdir(self) -> Iterator["PathLike"]: ... 

22 

23 def with_suffix(self, suffix: str) -> "PathLike": ... 

24 

25 def with_name(self, name: str) -> "PathLike": ... 

26 

27 def stat(self) -> object: ... 

28 

29 def __truediv__(self, other: str) -> "PathLike": ...