Skip to content

Conversation

@DiddiLeija
Copy link
Member

This is something that I found on tools/tox_pip.py:

I consider that if typing.List is going to be imported, it must be used as an annotation, not to be commented. Or maybe using typing.Sequence could be better. If am wrong with something, please tell me.

(I agree to the PSF code of conduct).

Ic onsider that if `typing.List` is going to be imported, it must be used as an annotation, not to be commented. Or maybe using `typing.Sequence` could be better. If am wrong with something, please tell me.
This is the NEWS document for this branch.
@DiddiLeija
Copy link
Member Author

Tell me if I did something wrong please 😄 . Thanks.

@pfmoore
Copy link
Member

pfmoore commented May 20, 2021

The comments are Python 2 style type annotations. As we no longer support Python 2, we can (and should) move to proper annotations, but I think we'll probably do that as a larger exercise, rather than just changing individual definitions.

@DiddiLeija
Copy link
Member Author

Ok, thank you. On my commit, I didn't moved the comments, because I thought both where necessary.

If I can do something else, tell me please.

@DiddiLeija
Copy link
Member Author

Sorry, I have a question: Is this PR available to be applied, or it must be replaced by another one?

Anyway, I would like to collaborate on this topic. If you want, I can work on it on my fork.

@uranusjr
Copy link
Member

I wouldn't mind merging this on its own if you remove the type comment.

@DiddiLeija
Copy link
Member Author

Ok. I will try it.

After adding "typing.List" as Python 3 annotations, remove the old annotations (commentaries).
@DiddiLeija
Copy link
Member Author

Done. I replaced the type commentaries from tox_pip.py.

Remove the item marker.

Co-authored-by: Tzu-ping Chung <[email protected]>
@DiddiLeija
Copy link
Member Author

Ok. Do I have to improve anything else? Tell me, please.

Fix the code blocks

Co-authored-by: Tzu-ping Chung <[email protected]>
Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

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

Waiting for CI to pass.

@DiddiLeija
Copy link
Member Author

Ok. Thank you very much.

@DiddiLeija
Copy link
Member Author

I can't merge. If you want to merge, you can do it.

Thanks 😄 .

@uranusjr uranusjr merged commit 5ee933a into pypa:main May 25, 2021
DiddiLeija added a commit to DiddiLeija/pip that referenced this pull request Jun 16, 2021
This job started with my PR pypa#10004. When I started to replace the type commentaries into proper annotations. For this pull request, I'll take `pip/_internal/distributions`.
@DiddiLeija DiddiLeija deleted the typing-List-annotate-1 branch September 17, 2021 13:26
@DiddiLeija DiddiLeija restored the typing-List-annotate-1 branch September 17, 2021 13:28
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 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