-
Notifications
You must be signed in to change notification settings - Fork 250
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
Signature of ItemsView in typing.py does not match that in typeshed's typing.pyi #177
Comments
I think this was fixed by my fix for #115. The mapping view objects are now defined as follows:
(The |
I have a questions here. What is the reason to have |
Good catch! Probably a sleepy copy/paste from collections.abc. Will fix. |
This came up in #136 (comment).
There seems to be a bug in the definition of ItemsView in typing.py: it has three type parameters, but its unclear what they mean. When looking at the corresponding definition in typeshed, it actually makes more sense:
Here MappingView is not generic (since Sized isn't), and ItemsView has only two parameters, clearly meant for keys and values, and clarified by the
__contains__
and__iter__
signatures.I think we should follow this example.
The text was updated successfully, but these errors were encountered: