-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
522f841
commit 1b49c9f
Showing
3 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
try: | ||
import click | ||
except ImportError: | ||
print("Please install click for this example") | ||
print(" pip install click") | ||
exit() | ||
|
||
from rich.traceback import install | ||
|
||
install(suppress=[click]) | ||
|
||
|
||
@click.command() | ||
@click.option("--count", default=1, help="Number of greetings.") | ||
def hello(count): | ||
"""Simple program that greets NAME for a total of COUNT times.""" | ||
1 / 0 | ||
for x in range(count): | ||
click.echo(f"Hello {name}!") | ||
|
||
|
||
if __name__ == "__main__": | ||
hello() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters