Update class literal display to use <class 'Foo'> style (#17889)

## Summary

Closes https://github.com/astral-sh/ruff/issues/17238.
This commit is contained in:
Charlie Marsh
2025-05-06 20:11:25 -04:00
committed by GitHub
parent b2de749c32
commit a2e9a7732a
48 changed files with 311 additions and 309 deletions

View File

@@ -22,6 +22,6 @@ reveal_type(A | B) # revealed: UnionType
class A: ...
class B: ...
# error: "Operator `|` is unsupported between objects of type `Literal[A]` and `Literal[B]`"
# error: "Operator `|` is unsupported between objects of type `<class 'A'>` and `<class 'B'>`"
reveal_type(A | B) # revealed: Unknown
```