-
Notifications
You must be signed in to change notification settings - Fork 3k
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: pip/_internal/models
#10138
Merged
uranusjr
merged 23 commits into
pypa:main
from
DiddiLeija:pip/_internal/models-annotations
Jul 12, 2021
Merged
Complete type annotations: pip/_internal/models
#10138
uranusjr
merged 23 commits into
pypa:main
from
DiddiLeija:pip/_internal/models-annotations
Jul 12, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Convert type commentaries into proper annotations.
Fix them on "direct_url.py".
The news entry for my pull request.
DiddiLeija
commented
Jul 6, 2021
Seems like there are some forward references. I'll fix them in a commit. |
Convert some annotations into strings.
Fix them on "format_control.py".
Add a missing bracket.
The line was too long (90 > 88 characters).
Fix them on "link.py".
Fix them on "scheme.py". Translate the original type hint commentary and add the return value (as "None").
Seems like the modifications I made on
How can I fix it? Must I change the original annotation? |
DiddiLeija
commented
Jul 8, 2021
The mypy test suggested to change this annotation: comes_from: Optional[Union[HTMLPage]] = None, with this one: comes_from: Optional[HTMLPage] = None,
It was not necessary (and it was incorrect). The required fix has not been defined yet.
The argument "comes_from" can be "str" or "HTMLPage".
uranusjr
reviewed
Jul 9, 2021
Convert a failing annotation into a string.
Fix them on search_scope.py
Fix them on selection_prefs.py
Fix them on target_python.py
On "target_python.py", I annotated a return value incorrectly.
Fix them on wheel.py
I think this pull request is ready to be reviewed again. What do you think about it? |
uranusjr
approved these changes
Jul 12, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Convert type commentaries into proper annotations on
pip/_internal/models
.