Skip to content

Commit

Permalink
Fix program name for CLI commands
Browse files Browse the repository at this point in the history
  • Loading branch information
nanory committed Dec 19, 2023
1 parent 4f2d1e2 commit 838f27f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/glvd/cli/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ..registry import CliRegistry


cli = CliRegistry()
cli = CliRegistry('glvd')

cli.add_argument(
'--server',
Expand Down
2 changes: 1 addition & 1 deletion src/glvd/cli/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ..registry import CliRegistry


cli = CliRegistry()
cli = CliRegistry('glvd-data')

cli.add_argument(
'--database',
Expand Down
4 changes: 2 additions & 2 deletions src/glvd/cli/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class CliRegistry:

arguments: list[_ActionWrapper]

def __init__(self) -> None:
def __init__(self, name: str) -> None:
self.parser = argparse.ArgumentParser(
allow_abbrev=False,
prog='glvd',
prog=name,
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
self.subparsers = self.parser.add_subparsers(
Expand Down

0 comments on commit 838f27f

Please sign in to comment.