Last active
January 17, 2020 13:05
-
-
Save Robert-96/f0e247fd75eeff12ccdc2645106a22d7 to your computer and use it in GitHub Desktop.
Click version option with `--version` and `-v`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import click | |
# the version number to show. If None Click attempts an auto discovery via setuptools. | |
VERSION = "0.1" | |
@click.group() | |
@click.version_option(VERSION, "-v", "--version") | |
def cli(): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment