Skip to content

Add basic support for PEP 798 - #21976

Open
ilevkivskyi wants to merge 1 commit into
python:masterfrom
ilevkivskyi:pep-798
Open

ilevkivskyi wants to merge 1 commit into
python:masterfrom
ilevkivskyi:pep-798

Conversation

@ilevkivskyi

Copy link
Copy Markdown
Member

Fixes #21489

Things are mostly straightforward. I also add support for old parser. Two non-trivial things:

  • I wrap constructor arguments instead of using ARG_STAR actual kind, because there is a limitation in argmap.py that it can't handle structural iterables. We have a bunch of issues open about this, and there were some attempts to fix it, but they stalled.
  • I force union inference for star-unpacks in comprehensions. Otherwise we will get too many builtins.object if we use joins. I think it is fine, since this is a new syntax.

@github-actions

Copy link
Copy Markdown
Contributor

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

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.

Support PEP 798

1 participant