Skip to content

Commit

Permalink
Run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
LecrisUT committed Jun 28, 2024
1 parent 46bbaba commit e244492
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@

- Backwards compatibility between click 7 & 8
- support for click 8 changes
- Update tests to expect hyphens
- Update tests to expect hyphens
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def myrepl():
'history': FileHistory('/etc/myrepl/myrepl-history'),
}
repl(click.get_current_context(), prompt_kwargs=prompt_kwargs)

cli()
```
And then your custom `myrepl` command will be available on your CLI, which
Expand Down
1 change: 0 additions & 1 deletion click_repl/_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ def _get_completion_for_Boolean_type(self, param, incomplete):
]

def _get_completion_from_params(self, autocomplete_ctx, args, param, incomplete):

choices = []
param_type = param.type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,8 @@ def shell_complete_func(ctx, param, incomplete):
def autocompletion_cmd2(handler):
pass

completions = list(
c.get_completions(Document("autocompletion-cmd2 --handler "))
)
completions = list(c.get_completions(Document("autocompletion-cmd2 --handler ")))
assert {x.text for x in completions} == {"foo", "bar"}

completions = list(
c.get_completions(Document("autocompletion-cmd2 --handler "))
)
completions = list(c.get_completions(Document("autocompletion-cmd2 --handler ")))
assert {x.text for x in completions} == {"foo", "bar"}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,5 @@ def shell_complete_func(ctx, args, incomplete):
def autocompletion_opt_cmd2(handler):
pass

completions = list(
c.get_completions(Document("autocompletion-opt-cmd2 --handler "))
)
completions = list(c.get_completions(Document("autocompletion-opt-cmd2 --handler ")))
assert {x.text for x in completions} == {"foo", "bar"}
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ def args_choices_hidden_cmd(handler):
completions = list(c.get_completions(Document("args-choices-hidden-cmd foo ")))
assert {x.text for x in completions} == set()

completions = list(
c.get_completions(Document("args-choices-hidden-cmd --handler "))
)
completions = list(c.get_completions(Document("args-choices-hidden-cmd --handler ")))
assert {x.text for x in completions} == set()


Expand Down
4 changes: 1 addition & 3 deletions tests/test_dev/test_get_internal_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,4 @@ def test_get_registered_target_exit_cmd(test_input, expected):

@pytest.mark.parametrize("test_input", ["hi", "hello", "76q358767"])
def test_get_registered_target(test_input):
assert (
click_repl.utils._get_registered_target(test_input, "Not Found") == "Not Found"
)
assert click_repl.utils._get_registered_target(test_input, "Not Found") == "Not Found"

0 comments on commit e244492

Please sign in to comment.