Skip to content

Commit ad9bf38

Browse files
committed
Add type: ignores to pkg_resources
1 parent 02c8b5c commit ad9bf38

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pip/_internal/metadata/pkg_resources.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def from_metadata_file_contents(
125125
}
126126
dist = pkg_resources.DistInfoDistribution(
127127
location=filename,
128-
metadata=InMemoryMetadata(metadata_dict, filename),
128+
metadata=InMemoryMetadata(metadata_dict, filename), # type: ignore[arg-type]
129129
project_name=project_name,
130130
)
131131
return cls(dist)
@@ -146,7 +146,7 @@ def from_wheel(cls, wheel: Wheel, name: str) -> BaseDistribution:
146146
raise UnsupportedWheel(f"{name} has an invalid wheel, {e}")
147147
dist = pkg_resources.DistInfoDistribution(
148148
location=wheel.location,
149-
metadata=InMemoryMetadata(metadata_dict, wheel.location),
149+
metadata=InMemoryMetadata(metadata_dict, wheel.location), # type: ignore[arg-type]
150150
project_name=name,
151151
)
152152
return cls(dist)
@@ -176,7 +176,7 @@ def installed_by_distutils(self) -> bool:
176176
# provider has a "path" attribute not present anywhere else. Not the
177177
# best introspection logic, but pip has been doing this for a long time.
178178
try:
179-
return bool(self._dist._provider.path)
179+
return bool(self._dist._provider.path) # type: ignore
180180
except AttributeError:
181181
return False
182182

0 commit comments

Comments
 (0)