-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
@sys.meta_path.append type error #5589
Comments
The type of The class is defined here: https://github.com/python/typeshed/blob/master/stdlib/3/importlib/abc.pyi#L55 Subclassing from it should fix the error. I don't think there is any bug here? |
(Feel free to reopen if you disagree) |
Perhaps it's a bug in typeshed... and the spec should be more lenient, to allow for |
Oh, indeed, I missed that it contained classes and not the objects.
|
Yes it is a typeshed bug, not mypy bug. @msullivan's suggestion should fix it in typeshed. |
I'm not sure if this is a bug in Python or in mypy, or there is no bug at all. It seems a bit weird given the contents of
sys.meta_path
and my grep-fu must suck because I can't find where the signature is defined. Here's the code:and the error:
and the contents of
sys.meta_path
on a vanilla Python:The text was updated successfully, but these errors were encountered: