Skip to content

Commit

Permalink
fix cli help option elaboration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-dot committed Feb 16, 2024
1 parent bd3703b commit 8d693dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"python.linting.flake8Enabled": true,
"python.linting.mypyEnabled": true,
"python.linting.enabled": true,
"python.testing.pytestArgs": [],
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.formatting.provider": "black",
Expand Down
5 changes: 1 addition & 4 deletions src/blueapi/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,16 @@

from .rest import BlueapiRestClient

CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])


@click.group(invoke_without_command=True)
@click.version_option(version=__version__, prog_name="blueapi")
@click.option(
"-c", "--config", type=Path, help="Path to configuration YAML file", multiple=True
)
@click.pass_context
@click.command(context_settings=CONTEXT_SETTINGS)
def main(ctx: click.Context, config: Union[Optional[Path], Tuple[Path, ...]]) -> None:
# if no command is supplied, run with the options passed

ctx.help_option_names = ["-h", "--help"]
config_loader = ConfigLoader(ApplicationConfig)
if config is not None:
configs = (config,) if isinstance(config, Path) else config
Expand Down

0 comments on commit 8d693dc

Please sign in to comment.