Skip to content

Commit

Permalink
revert version detection
Browse files Browse the repository at this point in the history
  • Loading branch information
praiskup committed Sep 13, 2024
1 parent c4faaf1 commit 5232e5d
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions distgen/cli_parser.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
from argparse import ArgumentParser, RawDescriptionHelpFormatter

Check warning

Code scanning / vcs-diff-lint

Missing module docstring Warning

Missing module docstring

from importlib.metadata import version, PackageNotFoundError

try:
version = version("distgen")
except PackageNotFoundError:
# package is not installed, due to this file being used by manpage generator
# we have to check for this, we do not need valid version during manpage
# generation, but it will crash
version = 0
pass
from distgen.version import dg_version

description = \

Check warning

Code scanning / vcs-diff-lint

Constant name "description" doesn't conform to UPPER_CASE naming style Warning

Constant name "description" doesn't conform to UPPER_CASE naming style
"""
Expand All @@ -35,7 +26,7 @@
parser.add_argument(
'--version',
action='version',
version="dg (distgen) {0}".format(version)
version="dg (distgen) {0}".format(dg_version)

Check warning

Code scanning / vcs-diff-lint

Formatting a regular string which could be an f-string Warning

Formatting a regular string which could be an f-string
)

parser.add_argument(
Expand Down Expand Up @@ -138,4 +129,4 @@
'--multispec-combinations',
action='store_true',
help='Print available multispec combinations',
)
)

0 comments on commit 5232e5d

Please sign in to comment.