Skip to content

Do not show protocol compatibility note against unpacked sequence or mapping #19358

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

Merged

Conversation

sterliakov
Copy link
Collaborator

This was discovered in #19294 where an unrelated change produced a weird notice that should not be shown. Current behavior of the added testcase:

main.py:10: error: Argument 1 to "foo" has incompatible type "*list[object]"; expected "P"  [arg-type]
main.py:10: note: "list" is missing following "P" protocol member:
main.py:10: note:     arg
main.py:11: error: Argument 1 to "foo" has incompatible type "**dict[str, object]"; expected "P"  [arg-type]
main.py:11: note: "dict" is missing following "P" protocol member:
main.py:11: note:     arg

https://mypy-play.net/?mypy=master&python=3.12&flags=strict&gist=d0228ba7d2802db8ac4457f374ccc148

Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@hauntsaninja hauntsaninja merged commit 9934278 into python:master Jun 30, 2025
19 checks passed
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.

2 participants