-
Couldn't load subscription status.
- Fork 3.2k
[typing] Fix minor typing of pip._internal sub packages utils, exceptions, locations, self_outdated_check #13622
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @pelson, thanks again for your contribution to pip! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than the one rewrite you suggested and I prefer that we went with.
a9c0576 to
72554d7
Compare
| from distutils.dist import Distribution | ||
|
|
||
| cmd: Any = install(Distribution()) | ||
| cmd: install = install(Distribution()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m just curious why this annotation is even needed. Shouldn’t the return type be inferred…?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right. I checked with both our existing mypy calls and with the full mypy in #13599, and in both cases reveal_type correctly gives us the install command class as the type.
I've added a commit.
Follows on from issues identified through #13599.
As before, intentionally targeting zero functional change.