Skip to content

fix Unpacking dict in class header (i.e. in class kwargs) #1762#4076

Open
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:1762
Open

fix Unpacking dict in class header (i.e. in class kwargs) #1762#4076
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:1762

Conversation

@asukaminato0721

Copy link
Copy Markdown
Contributor

Summary

Fixes #1762

Changed class header keyword handling so **kwargs is no longer rejected in binding.

Unpacked class keywords are now validated at solve time: precise TypedDict/anonymous dict fields are expanded into class metadata, broad Mapping[str, T] values are accepted as opaque, and invalid ** operands/key types report BadUnpacking.

Test Plan

add test

@meta-cla meta-cla Bot added the cla signed label Jul 8, 2026
@github-actions github-actions Bot added the size/s label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unpacking dict in class header (i.e. in class kwargs)

1 participant