Infer return type annotation from other function's annotation
Infer return type annotation from other function's annotation Question: I have a function with a complex return type annotation: from typing import (Union, List) # The -> Union[…] is actually longer than this example: def parse(what: str) -> Union[None, int, bool, float, complex, List[int]]: # do stuff and return the object as needed def parse_from_something(which: …