Skip to content

Commit

Permalink
Fix problem with version 8 of click. Closes #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Nfsaavedra committed Jun 14, 2022
1 parent 4e0f461 commit 42cb352
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion glitch/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def parse_and_check(type, path, module, parser, analyses, errors, stats):
@click.option('--autodetect', is_flag=True, default=False,
help="This flag allows for the automatic detection of the type of script being analyzed. Only relevant for Ansible and when"
"you are using the dataset flag.")
@click.option('--smells', cls=RulesListOption, default=[], multiple=True,
@click.option('--smells', cls=RulesListOption, multiple=True,
help="The type of smells being analyzed.")
@click.argument('path', type=click.Path(exists=True), required=True)
@click.argument('output', type=click.Path(), required=False)
Expand Down
35 changes: 17 additions & 18 deletions glitch/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,24 @@ def __init__(
type=None, help=None,
hidden=False,
show_choices=True,
show_envvar=False,
**attrs):
show_envvar=False
):
super().__init__(
param_decls,
show_default,
prompt,
confirmation_prompt,
hide_input,
is_flag,
flag_value,
multiple,
count,
allow_from_autoenv,
type,
help,
hidden,
show_choices,
show_envvar,
**attrs
param_decls = param_decls,
show_default = show_default,
prompt = prompt,
confirmation_prompt = confirmation_prompt,
hide_input = hide_input,
is_flag = is_flag,
flag_value = flag_value,
multiple = multiple,
count = count,
allow_from_autoenv = allow_from_autoenv,
type = type,
help = help,
hidden = hidden,
show_choices = show_choices,
show_envvar = show_envvar,
)
rules = list(map(lambda c: c.get_name(), RuleVisitor.__subclasses__()))
self.type = click.Choice(rules, case_sensitive=False)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
install_requires=[
"ruamel.yaml",
"ply",
"click==7.1.2",
"click",
"alive-progress",
"prettytable",
"pandas"
Expand Down

0 comments on commit 42cb352

Please sign in to comment.