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

Unable to find collections.abc.Iterable #817

Closed
lamenezes opened this issue Jan 9, 2017 · 2 comments
Closed

Unable to find collections.abc.Iterable #817

lamenezes opened this issue Jan 9, 2017 · 2 comments

Comments

@lamenezes
Copy link
Contributor

I've implemented something like the following code, but mypy checks returns the error in the title

from collections import abc


class Foo(abc.Iterable, abc.Container):
    pass

The complete error output is:

example.py:4: error: Name 'abc.Iterable' is not defined

It seems mypy checks aren't considering the collections.abc module. Since collections.Container is found, but not collections.abc.Iterable.

Is this really an issue or am I missing something?

@gvanrossum
Copy link
Member

Thanks for reporting. The problem is that the stub for collections.abc is incomplete, it is missing some imports.

Do you feel like helping out by submitting a pull request?

@lamenezes
Copy link
Contributor Author

Sure, I will submit a PR as soon as I can.

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