Skip to content
Myr

typing_simple_example.py

This file

Path

tests/typing/typing_simple_example.py

17 lines · 508 bytes · Python

Last changed by

update dev dependenciesDavid Lordbefore adoption15959d9

History of this file

Take it

Merge branch '8.1.x'David Lordbefore adoptionb765b12

line 1why, one step back
1"""The simple example from https://github.com/pallets/click#a-simple-example."""

update dev dependenciesDavid Lordbefore adoption15959d9

line 2why, one step back
2

Merge branch '8.1.x'David Lordbefore adoptionb765b12

lines 3–17why, one step back
3from typing_extensions import assert_type
45import 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)