question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Example not working as expected

See original GitHub issue

Describe the bug

Write here a clear and concise description of what the bug is.

To Reproduce

  • Create a file main.py with:
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:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
enbermudascommented, Dec 26, 2019

I just closed and reopened my terminal and it is working now. Weird problem.

0reactions
tiangolocommented, Apr 10, 2020

Thanks for the help here @kousikmitra ! 👏 🙇

Thanks for reporting back and closing the issue @enbermudas 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found