Skip to content

Complete type annotations in pip/_internal/metadata #10168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/pip/_internal/metadata/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ def local(self) -> bool:
def in_usersite(self) -> bool:
raise NotImplementedError()

def iter_dependencies(self, extras=()):
# type: (Collection[str]) -> Iterable[Requirement]
def iter_dependencies(self, extras: Collection[str] = ()) -> Iterable[Requirement]:
raise NotImplementedError()


Expand Down
3 changes: 1 addition & 2 deletions src/pip/_internal/metadata/pkg_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ def local(self) -> bool:
def in_usersite(self) -> bool:
return misc.dist_in_usersite(self._dist)

def iter_dependencies(self, extras=()):
# type: (Collection[str]) -> Iterable[Requirement]
def iter_dependencies(self, extras: Collection[str] = ()) -> Iterable[Requirement]:
# pkg_resources raises on invalid extras, so we sanitize.
requested_extras = set(extras)
valid_extras = requested_extras & set(self._dist.extras)
Expand Down