πŸ’­ Document how to provide a negative number as an argument Β· fas... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ !https://github.com/fastapi/typer/discussions/798 Date: October 30, 2024 Image: Document how to provide a negative number as an argument Β· fastapi typer Β· Discussion #798 β€” First Check I added a very descriptive title here. I used the GitHub search to find a similar question and didn't find it. I searched the Typer documentation, with the integrated search. I already ... Document how to provide a negative number as an argument Β· fastapi typer Β· Discussion #798 First Check I added a very descriptive title here. I used the GitHub search to find a similar question and didn't find it. I searched the Typer documentation, with the integrated search. I already ... GitHub Β· github.com Today I learned that you cannot pass negative integers as values to typer. in this case context_settings={"ignore_unknown_options": True} is required so that the - does not look like a flag. ``` # script name: main.py import typer app = typer.Typer() @app.command() def failing(value: float): print(f"{value=}") @app.command( context_settings={"ignore_unknown_options": True} ) def working_good(value: float): print(f"{value=}") if __name__ == "__main__": app() ``` NOTE β”‚ This post is a thought . It’s a short note that I make about someone else’s content online #thoughts