Skip to content
Myr

typing_options.py

This file

Path

tests/typing/typing_options.py

16 lines · 391 bytes · Python

Last changed by

Not known.

History of this file

Take it

1"""From https://click.palletsprojects.com/en/stable/quickstart/#adding-parameters"""23from typing_extensions import assert_type45import click678@click.command()9@click.option("--count", default=1, help="number of greetings")10@click.argument("name")11def hello(count: int, name: str) -> None:12    for _ in range(count):13        click.echo(f"Hello {name}!")141516assert_type(hello, click.Command)