
Oct. 7, 2021
5:53 p.m.
Maybe I'm misunderstanding, but are you just looking for a type alias? You should be able to write something like: MyType = Union[Some, Very, Long, Type] At least in VS Code (with Pylance/pyright), we'll show the alias name when it's used rather than expanding it out (only expanding it out when you hover over the alias itself so you can see what's in it). In Pylance, we have issues related to the size of the tooltips and are working on ways to better format things like functions with many, many parameters or overloads (but, are largely limited by what's currently available within the LSP / VS Code APIs).