Skip to content

Commit

Permalink
skip 'mara-' prefix from multi commands
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-schick committed Nov 27, 2023
1 parent ca5a4fb commit 67c16b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mara_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ def setup_commandline_commands():
package = command.__dict__['callback'].__module__.rpartition('.')[0]
# Give a package a chance to put all their commands as subcommands of the main package name.
# For that to work we have to make sure we do not add multiple commands with the same name
if isinstance(command, click.Group):
if isinstance(command, click.MultiCommand):
name = command.name
if name.startswith('mara-'):
name = name[5:]
else:
name = package + '.' + command.name
if name in known_names:
Expand Down

0 comments on commit 67c16b2

Please sign in to comment.