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

Fix Dictionary views "mapping" attribute in python 3.10 #6395

Closed
wants to merge 2 commits into from

Conversation

Rohan-Salwan
Copy link
Contributor

@github-actions

This comment has been minimized.

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Nov 27, 2021

Thanks, this isn't quite the right fix. It looks like this was in fact already fixed in #6039 (note the code was later moved around in #6312)

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@Rohan-Salwan
Copy link
Contributor Author

Thanks, this isn't quite the right fix. It looks like this was in fact already fixed in #6312

@hauntsaninja actually it was showing error that is why I tried to fix it. Please try to confirm this first.

@Akuli
Copy link
Collaborator

Akuli commented Nov 27, 2021

It is fixed:

(env) akuli@akuli-desktop:~/typeshed$ cat a.py
reveal_type({'a': 1}.keys().mapping)
(env) akuli@akuli-desktop:~/typeshed$ mypy --python-version 3.10 --custom-typeshed-dir . a.py
a.py:1: note: Revealed type is "types.MappingProxyType[builtins.str*, builtins.int*]"

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

Successfully merging this pull request may close these issues.

Dictionary views "mapping" attribute in Python 3.10
3 participants