Skip to content

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

Closed
Rohan-Salwan wants to merge 2 commits into
python:masterfrom
Rohan-Salwan:issue5812
Closed

Fix Dictionary views "mapping" attribute in python 3.10#6395
Rohan-Salwan wants to merge 2 commits into
python:masterfrom
Rohan-Salwan:issue5812

Conversation

@Rohan-Salwan

Copy link
Copy Markdown
Contributor

@github-actions

This comment has been minimized.

@hauntsaninja

hauntsaninja commented Nov 27, 2021

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Contributor

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

@Rohan-Salwan

Copy link
Copy Markdown
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

Akuli commented Nov 27, 2021

Copy link
Copy Markdown
Collaborator

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