Skip to content

Allow Void typed values as returns from None functions - #2829

Closed
TRManderson wants to merge 5 commits into
python:masterfrom
TRManderson:#2828
Closed

TRManderson wants to merge 5 commits into
python:masterfrom
TRManderson:#2828

Conversation

@TRManderson

Copy link
Copy Markdown
Contributor

Fixes #2828

@TRManderson

Copy link
Copy Markdown
Contributor Author

The test failing is one that explicitly tests that there is an error when attempting this :/

def f() -> None:
return None
def g() -> None:
return f() # E: No return value expected

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you keep the test case, but just remove the error message? I.e. it would test that this no longer generates an error message.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@ilevkivskyi

Copy link
Copy Markdown
Member

This PR looks good to me. It is still marked with Changes requested although changes has ben already made.

@ddfisher

Copy link
Copy Markdown
Collaborator

This has been superseded by a more complete fix in #3024. Thanks for looking into this!

@ddfisher ddfisher closed this Mar 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants