[ty] Test tagged union narrowing for named tuples#25519
Merged
Conversation
AlexWaygood
approved these changes
Jun 1, 2026
carljm
added a commit
that referenced
this pull request
Jun 1, 2026
* main: [`pydocstyle`] Improve discoverability of rules enabled for each convention (#24973) [ty] Deduplicate retained use-def place states (#25450) [ty] reduce features of low-level crates depended on by `ty_python_semantic` (#25524) [ty] Fix narrowing enum literal unions by member identity (#25520) [ty] Test tagged union narrowing for named tuples (#25519) [ty] Disallow file-system access in `ty_python_core` (#25518) [ty] Nominal Tagged Union Narrowing (#24916) Commit `scripts/uv.lock` (#25517) Fix potential index out of range in `LineIndex` computation (#25492) [ty] Sync vendored typeshed stubs (#25514) [ty] Add disjointness for protocol method members (#25315) [ty] Use compact sets for more immutable fields (#25476) [ty] Derive `Default` for `FunctionDecoratorInference` (#25482) [ty] Ignore rejected assignments for synthesized bindings (#25340) [ty] Handle cycles in function decorator inference (#25475) docs: fix typo `bin/active` → `bin/activate` in tutorial (#25473) [ty] Narrow bound method overloads by receiver (#24707)
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.
Summary
Add an mdtest showing that tagged-union narrowing also works for
NamedTupleclasses.