typing_simple_example.py
This file
Path
tests/typing/typing_simple_example.py
17 lines · 508 bytes · Python
Last changed by
Not known.
History of this fileTake it
1"""The simple example from https://github.com/pallets/click#a-simple-example."""23from typing_extensions import assert_type45import click678@click.command()9@click.option("--count", default=1, help="Number of greetings.")10@click.option("--name", prompt="Your name", help="The person to greet.")11def hello(count: int, name: str) -> None:12 """Simple program that greets NAME for a total of COUNT times."""13 for _ in range(count):14 click.echo(f"Hello, {name}!")151617assert_type(hello, click.Command)