Skip to content

Commit

Permalink
Use same -h everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed Jan 8, 2025
1 parent dabbf2d commit b408e8d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions conda_lock/conda_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,8 +1191,10 @@ def main() -> None:
Literal["CRITICAL"],
]

CONTEXT_SETTINGS = {"show_default": True, "help_option_names": ["--help", "-h"]}

@main.command("lock", context_settings={"show_default": True, "help_option_names": ["--help", "-h"]})

@main.command("lock", context_settings=CONTEXT_SETTINGS)
@click.option(
"--conda",
default=None,
Expand Down Expand Up @@ -1457,7 +1459,7 @@ def lock(
DEFAULT_INSTALL_OPT_LOCK_FILE = pathlib.Path(DEFAULT_LOCKFILE_NAME)


@main.command("install", context_settings={"show_default": True})
@main.command("install", context_settings=CONTEXT_SETTINGS)
@click.option(
"--conda",
default=None,
Expand Down Expand Up @@ -1611,7 +1613,7 @@ def install(
install_func(file=lockfile)


@main.command("render", context_settings={"show_default": True})
@main.command("render", context_settings=CONTEXT_SETTINGS)
@click.option(
"--dev-dependencies/--no-dev-dependencies",
is_flag=True,
Expand Down Expand Up @@ -1692,7 +1694,7 @@ def render(
)


@main.command("render-lock-spec", context_settings={"show_default": True})
@main.command("render-lock-spec", context_settings=CONTEXT_SETTINGS)
@click.option(
"--conda",
default=None,
Expand Down

0 comments on commit b408e8d

Please sign in to comment.