Skip to content

When I omit the "return", mypy does not check #2033

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

Closed
DKXXXL opened this issue Aug 17, 2016 · 1 comment
Closed

When I omit the "return", mypy does not check #2033

DKXXXL opened this issue Aug 17, 2016 · 1 comment

Comments

@DKXXXL
Copy link

DKXXXL commented Aug 17, 2016

def p(a:int)->int:
    b = a+1
k = p(1)

p should be "int -> None"
mypy 0.4.3 said nothing

@gvanrossum
Copy link
Member

Yeah, that's a known issue. I believe it can only be resolved after we implement strict optional checking. Until then, this is probably the relevant issue, and I'm going to close you as a duplicate:
#1748

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

No branches or pull requests

2 participants