ruff
0e365180 - [ty] Add membership narrowing ecosystem regression (#26991)

Commit
86 days ago
[ty] Add membership narrowing ecosystem regression (#26991) ## Summary Adds a regression test for the [ibis ecosystem hit surfaced by #26988](https://github.com/astral-sh/ruff/pull/26988#issuecomment-5017218003). Membership narrowing previously replaced an explicitly annotated literal union with promotable literals from the tuple, causing an inferred instance attribute to widen to `str` when read from another method. The test ensures that the literal union is preserved across the assignment and subsequent return.
Author
Parents
Loading