Skip to content
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

Kill Void in strict optional mode #1980

Merged
merged 1 commit into from
Aug 3, 2016
Merged

Conversation

ddfisher
Copy link
Collaborator

@ddfisher ddfisher commented Aug 3, 2016

This preserves the vast majority of "Function does not return a value" warnings provided by Void.

Fixes #1975.
Fixes #1956.

@ddfisher
Copy link
Collaborator Author

ddfisher commented Aug 3, 2016

It looks like this fixes roughly 30 of the mypy --strict-optional mypy errors.

@ddfisher ddfisher force-pushed the void-also-gazes-into-you branch from 21e925a to 04badd7 Compare August 3, 2016 01:28
@gvanrossum gvanrossum merged commit ef0382e into master Aug 3, 2016
@gvanrossum
Copy link
Member

I'm feeling lucky today. :-)

@rwbarton
Copy link
Contributor

Yay!

I'm not super enthused about having "mostly equal" types NoneTyp(is_ret_type=False) and NoneTyp(is_ret_type=True), since it becomes unclear in which contexts the difference matters. For example what is join_types(NoneTyp(is_ret_type=False), NoneTyp(is_ret_type=True))? Or does it not really matter? I wonder if you can achieve the same result with purely syntactic checks.

Still very happy to see the Void/NoneTyp distinction gone though.

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.

3 participants