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 type incompatible with supertype error should specify the types involved #2797

Closed
joshuawarner32 opened this issue Feb 2, 2017 · 2 comments · Fixed by #6979
Closed

Comments

@joshuawarner32
Copy link

I'm a relatively new user to mypy, and I have a quick bit of feedback / suggestion:

(Tangentially related to #2783 and/or #2782)

I see this error message:

error: Return type of "__iter__" incompatible with supertype "Iterable"

It would be really helpful if the message specified what the return type is, and more helpfully, what mypy thinks it should be.

This is particularly helpful in the context of generic/templated types like Iterable, where reading the definition of the type doesn't immediately give you the answer. In other words: "Oh no! I have to think!" 😃

@joejuzl
Copy link
Contributor

joejuzl commented Jun 12, 2019

I would like to give this a go if that's ok.

@ilevkivskyi
Copy link
Member

OK, great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants