Skip to content

Commit

Permalink
fix: remove unnecessary - commands aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
gavindsouza committed Feb 18, 2020
1 parent 214a209 commit e435500
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions bench/commands/config.py
Expand Up @@ -9,17 +9,7 @@
import click



class AliasedGroup(click.Group):
def get_command(self, ctx, cmd_name):
try:
cmd_name = ALIASES[cmd_name].name
except KeyError:
pass
return super(AliasedGroup, self).get_command(ctx, cmd_name)


@click.group(cls=AliasedGroup, help='Change bench configuration')
@click.group(help='Change bench configuration')
def config():
pass

Expand Down Expand Up @@ -130,6 +120,3 @@ def remove_common_config(keys):
config.add_command(config_http_timeout)
config.add_command(set_common_config)
config.add_command(remove_common_config)

# aliases for _ seperated commands to - ones
ALIASES = {k.replace('_', '-'):v for k, v in config.commands.items() if '_' in k}

0 comments on commit e435500

Please sign in to comment.