Repository navigation
Accept string keys in Python XAML ResourceDictionary - #221
Merged
leileizhang (lei9444) merged 4 commits intoOct 29, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c000b813-441b-407a-bac9-7d03e70279c0
Mixed-language test coverageWorkflow status: ✅ Passed
|
Normalize ResourceDictionary string subclasses to their underlying str before explicit String boxing. Cover enum keys in generated stubs, inline consumers, native Mapping operations and the WinUI runner without changing generic Object boxing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ba086f9c-a9d8-4e7e-abb3-d0fea864064c
Restore and verify one SDK corpus in Build and coverage instead of reading the runner's rolling installation. Reuse the CI-only pinning fix from PR #225 and preserve exact nullability and dispatcher assertions without changing production generation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ba086f9c-a9d8-4e7e-abb3-d0fea864064c
Retain resolved WinMD ancestor identities and apply the checked ResourceDictionary key contract to derived projections. Emit Mapping default TypeVars at module scope for Pyright inference and runtime annotation resolution. Add independent-default-interface and multilevel inheritance controls, pinned-Pyright inline/stub checks, and unchanged generic Object-map coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ba086f9c-a9d8-4e7e-abb3-d0fea864064c
shisan (qiutongMS)
approved these changes
Oct 29, 2026
leileizhang (lei9444)
deleted the
lei9444-python-resource-dictionary-keys
branch
October 29, 2026 03:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated WinUI and UWP
ResourceDictionaryprojections now acceptstrkeys directly in native lookup, membership, insertion and removal, with consistent Mapping helpers and.pyi/inline annotations. Keys are boxed as WinRT strings through the existing checked conversion path;lookupremains the native member rather than an overriding helper.Preserves raw/projected-object keys, raw Object results and key enumeration, defaults, native errors, lifetimes, and member/compatibility-alias precedence. Ordinary Object-keyed
IMap/IMapView, other Object APIs, JavaScript, core ABI and release metadata are unchanged.Regression coverage includes full-identity metadata controls, native-member/helper collisions, strict stub and inline consumers with negative controls, checked native inputs, and real WinUI
AccentButtonStylelookup and key operations.