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

Return value annotation with pass statement #8068

Closed
zkksch opened this issue Dec 4, 2019 · 1 comment
Closed

Return value annotation with pass statement #8068

zkksch opened this issue Dec 4, 2019 · 1 comment

Comments

@zkksch
Copy link

zkksch commented Dec 4, 2019

mypy==0.750

class Foo:
    def bar(self) -> int:
        pass


x: int = Foo().bar()
y = x + 2

I expected "Incompatible return value type", but mypy says that there are no issues. Is it bug or I can configure mypy in some way to disallow this kind of cases?

@ilevkivskyi
Copy link
Member

Duplicate of #2350

@ilevkivskyi ilevkivskyi marked this as a duplicate of #2350 Dec 4, 2019
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