First Check
Commit to Help
Example Code
import typer
from typing import Union
def main(name: Union[str, int]):
print(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)
Description
Typer does not yet support Union types. Running the above snippet yields:
AssertionError: Typer Currently doesn't support Union types
Not sure how much demand there is for this feature, but I'd personally love to have it.
Operating System
macOS
Operating System Details
No response
Typer Version
0.6.1
Python Version
3.10
Additional Context
Typer is amazing. Absolutely in love with it 💖.
First Check
Commit to Help
Example Code
Description
Typer does not yet support Union types. Running the above snippet yields:
Not sure how much demand there is for this feature, but I'd personally love to have it.
Operating System
macOS
Operating System Details
No response
Typer Version
0.6.1
Python Version
3.10
Additional Context
Typer is amazing. Absolutely in love with it 💖.