[BUG] Example not working as expected
See original GitHub issueDescribe the bug
Write here a clear and concise description of what the bug is.
To Reproduce
- Create a file
main.pywith:
import typer
app = typer.Typer()
@app.command()
def hello(name: str, formal: bool = False):
if formal:
typer.echo(f'Hello {name}')
else:
typer.echo(f'Whaaaasuuuup {name}')
if __name__ == '__main__':
app()
- Call it with:
python main.py --formal John
- It outputs:
Error: Got unexpected extra argument (Kike)
- But I expected it to output:
Hello John
Environment
- OS: Linux (Ubuntu 18.04)
- Typer Version: 0.0.4
python -c "import typer; print(typer.__version__)"
- Python version: 3.6.9
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Difference between Bugs, Errors and Issues | BrowserStack
What is a Bug? The term Bug refers to any shortcoming in a software system that causes it to behave in unexpected and...
Read more >Bug Types (Summary) | Test IO Academy
A bug is a software-related problem. If something on a website or in an application does not work as intended, this “error” is...
Read more >How to Write A Good Bug Report? Tips and Tricks
#7) Expected and Actual Result A Bug description is incomplete without the Expected and Actual results. It is necessary to outline what the ......
Read more >How to write a good bug report - Ten Forward Consulting
Include why you expected specific behavior. Not-so-good example: "I expected to see Janet's profile when viewing 'active' users." --> This ...
Read more >What is the difference between 'expected but not desired ...
The difference is that "bug" implies the software is doing something wrong, and that it should be able to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I just closed and reopened my terminal and it is working now. Weird problem.
Thanks for the help here @kousikmitra ! 👏 🙇
Thanks for reporting back and closing the issue @enbermudas 👍