File: typing_version_option.py

package info (click to toggle)
python-click 8.2.0%2B0.really.8.1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,456 kB
  • sloc: python: 11,531; makefile: 28; sh: 11
file content (16 lines) | stat: -rw-r--r-- 287 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""
From https://click.palletsprojects.com/en/8.1.x/options/#callbacks-and-eager-options.
"""

from typing_extensions import assert_type

import click


@click.command()
@click.version_option("0.1")
def hello() -> None:
    click.echo("Hello World!")


assert_type(hello, click.Command)