google / pytype

A static type analyzer for Python code
https://google.github.io/pytype
Other
4.78k stars 280 forks source link

Print union types with the pipe syntax #1794

Open copybara-service[bot] opened 1 month ago

copybara-service[bot] commented 1 month ago

Print union types with the pipe syntax

E.g. Foo | Bar rather than Union[Foo, Bar] and Foo | None rather than Optional[None]

This affect error messages, reveal_type, production of pyi files.