Skip to content

[ty] Test tagged union narrowing for named tuples#25519

Merged
sharkdp merged 1 commit into
mainfrom
codex/namedtuple-tagged-union-test
Jun 1, 2026
Merged

[ty] Test tagged union narrowing for named tuples#25519
sharkdp merged 1 commit into
mainfrom
codex/namedtuple-tagged-union-test

Conversation

@sharkdp
Copy link
Copy Markdown
Contributor

@sharkdp sharkdp commented Jun 1, 2026

Summary

Add an mdtest showing that tagged-union narrowing also works for NamedTuple classes.

@astral-sh-bot astral-sh-bot Bot added the ty Multi-file analysis & type inference label Jun 1, 2026
@sharkdp sharkdp self-assigned this Jun 1, 2026
@sharkdp sharkdp added the testing Related to testing Ruff itself label Jun 1, 2026
@sharkdp sharkdp marked this pull request as ready for review June 1, 2026 11:57
@sharkdp sharkdp enabled auto-merge (squash) June 1, 2026 11:57
@sharkdp sharkdp merged commit e151e96 into main Jun 1, 2026
50 checks passed
@sharkdp sharkdp deleted the codex/namedtuple-tagged-union-test branch June 1, 2026 12:01
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Related to testing Ruff itself ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants