Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/importlib_metadata/_meta.py: 100%
16 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-07 06:35 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-07 06:35 +0000
1from ._compat import Protocol
2from typing import Any, Dict, Iterator, List, TypeVar, Union
5_T = TypeVar("_T")
8class PackageMetadata(Protocol):
9 def __len__(self) -> int:
10 ... # pragma: no cover
12 def __contains__(self, item: str) -> bool:
13 ... # pragma: no cover
15 def __getitem__(self, key: str) -> str:
16 ... # pragma: no cover
18 def __iter__(self) -> Iterator[str]:
19 ... # pragma: no cover
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 """
26 @property
27 def json(self) -> Dict[str, Union[str, List[str]]]:
28 """
29 A JSON-compatible form of the metadata.
30 """
33class SimplePath(Protocol):
34 """
35 A minimal subset of pathlib.Path required by PathDistribution.
36 """
38 def joinpath(self) -> 'SimplePath':
39 ... # pragma: no cover
41 def __truediv__(self) -> 'SimplePath':
42 ... # pragma: no cover
44 def parent(self) -> 'SimplePath':
45 ... # pragma: no cover
47 def read_text(self) -> str:
48 ... # pragma: no cover