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

[0.980 backport] Allow unpacking from TypeVars with iterable bounds (#13425) #13644

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

hauntsaninja
Copy link
Collaborator

TypeVars aren't iterable, but their bounds might be! Resolve a TypeVar to its bounds before trying to decide how to unpack one of its instances.

Fixes #13402

* Allow unpacking from TypeVars by resolving bounds

TypeVars aren't iterable, but their bounds might be!
Resolve a TypeVar to its bounds before trying to decide how to unpack
one of its instances.

Fixes python#13402.
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

sublime_debugger (https://github.com/daveleroy/sublime_debugger)
- modules/core/event.py:27: error: "Unpack" is not supported by mypy yet
- modules/core/event.py:37: error: "Unpack" is not supported by mypy yet
+ modules/core/event.py:27: error: "Unpack" is not supported yet, use --enable-incomplete-features
+ modules/core/event.py:37: error: "Unpack" is not supported yet, use --enable-incomplete-features
- modules/core/event.py:59: error: "Unpack" is not supported by mypy yet
- modules/core/event.py:69: error: "Unpack" is not supported by mypy yet
- modules/core/event.py:75: error: "Unpack" is not supported by mypy yet
+ modules/core/event.py:59: error: "Unpack" is not supported yet, use --enable-incomplete-features
+ modules/core/event.py:69: error: "Unpack" is not supported yet, use --enable-incomplete-features
+ modules/core/event.py:75: error: "Unpack" is not supported yet, use --enable-incomplete-features
- modules/core/core.py:30: error: "Unpack" is not supported by mypy yet
- modules/core/core.py:33: error: "Unpack" is not supported by mypy yet
- modules/core/core.py:36: error: "Unpack" is not supported by mypy yet
- modules/core/core.py:42: error: "Unpack" is not supported by mypy yet
+ modules/core/core.py:30: error: "Unpack" is not supported yet, use --enable-incomplete-features
+ modules/core/core.py:33: error: "Unpack" is not supported yet, use --enable-incomplete-features
+ modules/core/core.py:36: error: "Unpack" is not supported yet, use --enable-incomplete-features
+ modules/core/core.py:42: error: "Unpack" is not supported yet, use --enable-incomplete-features
- modules/core/core.py:51: error: "Unpack" is not supported by mypy yet
+ modules/core/core.py:51: error: "Unpack" is not supported yet, use --enable-incomplete-features

@hauntsaninja hauntsaninja merged commit 70bc348 into python:release-0.980 Sep 12, 2022
@hauntsaninja hauntsaninja deleted the backport branch September 12, 2022 19:36
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