[ty] Resolve type aliases in filter_union method by carljm · Pull Request #22989 · astral-sh/ruff (original) (raw)

@claude

This change modifies filter_union to resolve type aliases before checking if the type is a union. This allows filter_union to properly handle cases where a type alias resolves to a union type.

With this change, the explicit resolve_type_alias call in bind.rs (added in #22988) is now redundant and has been removed.

Added additional test cases for union type aliases with:

https://claude.ai/code/session_01Fsp2dSw6mnTBV1M2Fnf6gt

@carljm carljm marked this pull request as ready for review

January 30, 2026 20:32

ibraheemdev

@carljm carljm deleted the claude/explore-typealias-expansion-31ZUP branch

January 30, 2026 22:39

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

[ Show hidden characters]({{ revealButtonHref }})