File: cli.py

package info (click to toggle)
sphinx-click 6.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 352 kB
  • sloc: python: 1,038; makefile: 10
file content (22 lines) | stat: -rw-r--r-- 477 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# file: cli.py
import click


@click.group()
@click.option(
    '--debug',
    default=False,
    is_flag=True,
    help="Output more information about what's going on.",
)
def cli(debug: bool) -> None:
    """A sample command group."""
    pass


@cli.command()
@click.option('--param', envvar='PARAM', help='A sample option')
@click.option('--another', metavar='[FOO]', help='Another option')
def hello(param: str, another: str) -> None:
    """A sample command."""
    pass