typing_simple_example.py
This file
Path
tests/typing/typing_simple_example.py
16 lines · 507 bytes · Python
Last changed by
Merge branch '8.1.x'David Lordbefore adoptionb765b12
History of this fileTake it
1"""The simple example from https://github.com/pallets/click#a-simple-example."""2from typing_extensions import assert_type34import click567@click.command()8@click.option("--count", default=1, help="Number of greetings.")9@click.option("--name", prompt="Your name", help="The person to greet.")10def hello(count: int, name: str) -> None:11 """Simple program that greets NAME for a total of COUNT times."""12 for _ in range(count):13 click.echo(f"Hello, {name}!")141516assert_type(hello, click.Command)