Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/importlib_metadata/_meta.py: 100%

17 statements  

« prev     ^ index     » next       coverage.py v7.0.1, created at 2022-12-25 06:11 +0000

1from ._compat import Protocol 

2from typing import Any, Dict, Iterator, List, TypeVar, Union 

3 

4 

5_T = TypeVar("_T") 

6 

7 

8class PackageMetadata(Protocol): 

9 def __len__(self) -> int: 

10 ... # pragma: no cover 

11 

12 def __contains__(self, item: str) -> bool: 

13 ... # pragma: no cover 

14 

15 def __getitem__(self, key: str) -> str: 

16 ... # pragma: no cover 

17 

18 def __iter__(self) -> Iterator[str]: 

19 ... # pragma: no cover 

20 

21 def get_all(self, name: str, failobj: _T = ...) -> Union[List[Any], _T]: 

22 """ 

23 Return all values associated with a possibly multi-valued key. 

24 """ 

25 

26 @property 

27 def json(self) -> Dict[str, Union[str, List[str]]]: 

28 """ 

29 A JSON-compatible form of the metadata. 

30 """ 

31 

32 

33class SimplePath(Protocol[_T]): 

34 """ 

35 A minimal subset of pathlib.Path required by PathDistribution. 

36 """ 

37 

38 def joinpath(self) -> _T: 

39 ... # pragma: no cover 

40 

41 def __truediv__(self, other: Union[str, _T]) -> _T: 

42 ... # pragma: no cover 

43 

44 @property 

45 def parent(self) -> _T: 

46 ... # pragma: no cover 

47 

48 def read_text(self) -> str: 

49 ... # pragma: no cover