Skip to content

Commit

Permalink
Show version in --help output
Browse files Browse the repository at this point in the history
  • Loading branch information
koenvervloesem committed Dec 22, 2023
1 parent 4954900 commit d7bbdba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion TheengsGateway/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import json
from pathlib import Path

from importlib_metadata import version

# Each configuration option is added to:
# - the DEFAULT_CONFIG dict with its default value
# - the parse_args function for its command-line argument
Expand Down Expand Up @@ -49,7 +51,9 @@

def parse_args() -> argparse.Namespace:
"""Parse command-line arguments and return them."""
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(
description=f"TheengsGateway {version('TheengsGateway')}",
)
parser.add_argument(
"-a",
"--adapter",
Expand Down

0 comments on commit d7bbdba

Please sign in to comment.