-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
astral-sh/ruff
#22592Labels
diagnosticsRelated to reporting of diagnostics.Related to reporting of diagnostics.help wantedContributions especially welcomeContributions especially welcome
Milestone
Description
When displaying a union (e.g. in error messages or on hover), it would be nicer if we displayed the union type[A] | type[B] | type[C] as type[A | B | C]. The latter means the same thing, is a valid type annotation, and is much more concise. This would be similar to the way we display Literal["a"] | Literal[42] | Literal[b"foooo"] as Literal["a", 42, b"foo"] in diagnostics and on hover.
Keeping type display concise where possible makes our diagnostics much more readable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
diagnosticsRelated to reporting of diagnostics.Related to reporting of diagnostics.help wantedContributions especially welcomeContributions especially welcome