Skip to content
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

Complete type annotations in pip/_internal/cli #10169

Merged
merged 2 commits into from
Jul 23, 2021

Conversation

harupy
Copy link
Contributor

@harupy harupy commented Jul 17, 2021

Complete type annotations in pip/_internal/cli.

@DiddiLeija
Copy link
Member

Hey @harupy. Thanks for completing my previous jobs! I only converted the type commentaries on functions (and some variables), so I (personally) appreciate your help.

@harupy
Copy link
Contributor Author

harupy commented Jul 22, 2021

@DiddiLeija No problem!

@@ -776,27 +776,27 @@ def _handle_no_use_pep517(
parser.values.use_pep517 = False


use_pep517 = partial(
use_pep517: Any = partial(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why this (and the one below) is Any instead of Callable[..., Option].

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, even if this were "wrong", Mypy won't fail over there, because it is not on "strict" mode, remember #10091 and #10076.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm more like trying to get into the mind of the person who wrote the original annotation (because all others are Callable[..., Option], persumably they should know this is possible).

@uranusjr uranusjr merged commit df98167 into pypa:main Jul 23, 2021
@harupy harupy deleted the annotations-internal-cli branch July 23, 2021 03:40
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants