We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95967ae commit 5c844d9Copy full SHA for 5c844d9
importlib_metadata/_meta.py
@@ -7,11 +7,13 @@
7
Protocol,
8
TypeVar,
9
overload,
10
+ runtime_checkable,
11
)
12
13
_T = TypeVar("_T")
14
15
16
+@runtime_checkable
17
class PackageMetadata(Protocol):
18
def __len__(self) -> int: ... # pragma: no cover
19
@@ -71,6 +73,7 @@ def read_bytes(self) -> bytes: ... # pragma: no cover
71
73
def exists(self) -> bool: ... # pragma: no cover
72
74
75
76
77
class IPackagePath(Protocol):
78
hash: Any | None
79
size: int | None
@@ -88,6 +91,7 @@ def parts(self) -> tuple[str, ...]: ... # pragma: no cover
88
91
def __fspath__(self) -> str: ... # pragma: no cover
89
92
90
93
94
95
class IDistribution(Protocol):
96
def read_text(
97
self, filename: str | os.PathLike[str]
0 commit comments