Skip to content

Kill Void in strict optional mode - #1980

Merged
gvanrossum merged 1 commit into
masterfrom
void-also-gazes-into-you
Aug 3, 2016
Merged

gvanrossum merged 1 commit into
masterfrom
void-also-gazes-into-you

Conversation

@ddfisher

@ddfisher ddfisher commented Aug 3, 2016

Copy link
Copy Markdown
Collaborator

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

Fixes #1975.
Fixes #1956.

@ddfisher

ddfisher commented Aug 3, 2016

Copy link
Copy Markdown
Collaborator Author

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
Copy Markdown
Member

I'm feeling lucky today. :-)

@rwbarton

Copy link
Copy Markdown
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