Skip to content

Commit

Permalink
normalize commands with underscores to dashes
Browse files Browse the repository at this point in the history
compat patch for click >= 7.0. see pallets/click#1123
  • Loading branch information
delgadom committed Apr 21, 2020
1 parent a1baf80 commit f9f2be6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jrnr/jrnr.py
Expand Up @@ -76,6 +76,11 @@
'''


def _normalize(name):
''' normalize click commands with underscores to dashes for click>=7.0 compatability '''
return name.replace("_", "-")


def _product(values):
'''
Examples
Expand Down Expand Up @@ -345,7 +350,7 @@ def slurm_runner(

warnings.warn(warning, FutureWarning)

@click.group()
@click.group(context_settings={"token_normalize_func": _normalize})
def slurm():
pass

Expand Down

0 comments on commit f9f2be6

Please sign in to comment.