Skip to content

bpo-38218: Corrected syntax for return annotation #16265

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

Merged
merged 1 commit into from
Sep 19, 2019

Conversation

pluradj
Copy link

@pluradj pluradj commented Sep 18, 2019

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@pluradj

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir awaiting review labels Sep 18, 2019
Copy link
Member

@tirkarthi tirkarthi left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the catch.

@@ -400,7 +400,7 @@ If a :keyword:`finally` clause is present, the :keyword:`finally` clause will ex

For example::

>>> def bool_return(): -> bool:
>>> def bool_return() -> bool:
Copy link
Member

Choose a reason for hiding this comment

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

I do not think this function should use a return annotation. No other code or examples (except related to the typing module) use annotations. I think it was intended as

def bool_return():  #  -> bool

Or maybe -> bool: should be removed at all.

Copy link
Author

Choose a reason for hiding this comment

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

agreed, happy to make that adjustment.

Copy link
Member

Choose a reason for hiding this comment

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

Seconding the

Or maybe -> bool: should be removed at all.

suggestion.

Signed-off-by: Jason Plurad <pluradj@us.ibm.com>
@pluradj
Copy link
Author

pluradj commented Sep 18, 2019

I've submitted the CLA just now.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Although this is an example of non-recommended code.

@miss-islington
Copy link
Contributor

Thanks @pluradj for the PR, and @matrixise for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 19, 2019
Signed-off-by: Jason Plurad <pluradj@us.ibm.com>
(cherry picked from commit 9ab6038)

Co-authored-by: Jason Plurad <pluradj@us.ibm.com>
@bedevere-bot
Copy link

GH-16272 is a backport of this pull request to the 3.8 branch.

@bedevere-bot
Copy link

GH-16273 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 19, 2019
Signed-off-by: Jason Plurad <pluradj@us.ibm.com>
(cherry picked from commit 9ab6038)

Co-authored-by: Jason Plurad <pluradj@us.ibm.com>
@matrixise
Copy link
Member

Thank you for your PR, because it's a type-documentation PR, I merge it into master, 3.8 and 3.7.
Have a nice day and thanks again. Thank you to @serhiy-storchaka and @tirkarthi for the reviews and approvals.

@miss-islington
Copy link
Contributor

Thanks @pluradj for the PR, and @matrixise for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @pluradj for the PR, and @matrixise for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 19, 2019
Signed-off-by: Jason Plurad <pluradj@us.ibm.com>
(cherry picked from commit 9ab6038)

Co-authored-by: Jason Plurad <pluradj@us.ibm.com>
@bedevere-bot
Copy link

GH-16274 is a backport of this pull request to the 3.8 branch.

@bedevere-bot
Copy link

GH-16275 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 19, 2019
Signed-off-by: Jason Plurad <pluradj@us.ibm.com>
(cherry picked from commit 9ab6038)

Co-authored-by: Jason Plurad <pluradj@us.ibm.com>
matrixise pushed a commit that referenced this pull request Sep 19, 2019
… (GH-16275)

Signed-off-by: Jason Plurad <pluradj@us.ibm.com>
(cherry picked from commit 9ab6038)

Co-authored-by: Jason Plurad <pluradj@us.ibm.com>
matrixise pushed a commit that referenced this pull request Sep 19, 2019
… (GH-16274)

Signed-off-by: Jason Plurad <pluradj@us.ibm.com>
(cherry picked from commit 9ab6038)

Co-authored-by: Jason Plurad <pluradj@us.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants