blob: 641937c5dc65f331de508ea7c23b11d99d479a90 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
"""The simple example from https://github.com/pallets/click#a-simple-example."""
from typing_extensions import assert_type
import click
@click.command()
@click.option("--count", default=1, help="Number of greetings.")
@click.option("--name", prompt="Your name", help="The person to greet.")
def hello(count: int, name: str) -> None:
"""Simple program that greets NAME for a total of COUNT times."""
for _ in range(count):
click.echo(f"Hello, {name}!")
assert_type(hello, click.Command)
|