Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions mycli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,60 @@ class CliArgs:
is_flag=True,
help='Run a checkup on your configuration.',
)
# hidden options which have no effect as of mycli 2.0.0, 2026-07.
# todo: remove the hidden options, since they are still advertised
# in spelling corrections.
ssl: bool | None = clickdc.option(
'--ssl/--no-ssl',
clickdc=None,
hidden=True,
deprecated='No effect. See --ssl-mode.',
)
ssh_user: str | None = clickdc.option(
type=str,
hidden=True,
deprecated='No effect. See https://github.com/dbcli/mycli/issues/1960 .',
)
ssh_host: str | None = clickdc.option(
type=str,
hidden=True,
deprecated='No effect. See https://github.com/dbcli/mycli/issues/1960 .',
)
ssh_port: int = clickdc.option(
type=int,
hidden=True,
deprecated='No effect. See https://github.com/dbcli/mycli/issues/1960 .',
)
ssh_password: str | None = clickdc.option(
type=str,
hidden=True,
deprecated='No effect. See https://github.com/dbcli/mycli/issues/1960 .',
)
ssh_key_filename: str | None = clickdc.option(
type=str,
hidden=True,
deprecated='No effect. See https://github.com/dbcli/mycli/issues/1960 .',
)
ssh_config_path: str = clickdc.option(
type=str,
hidden=True,
deprecated='No effect. See https://github.com/dbcli/mycli/issues/1960 .',
)
ssh_config_host: str | None = clickdc.option(
type=str,
hidden=True,
deprecated='No effect. See https://github.com/dbcli/mycli/issues/1960 .',
)
list_ssh_config: bool = clickdc.option(
is_flag=True,
hidden=True,
deprecated='No effect. See https://github.com/dbcli/mycli/issues/1960 .',
)
ssh_warning_off: bool = clickdc.option(
is_flag=True,
hidden=True,
deprecated='No effect. See https://github.com/dbcli/mycli/issues/1960 .',
)


def get_password_from_file(password_file: str | None) -> str | None:
Expand Down
2 changes: 2 additions & 0 deletions test/pytests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,8 @@ def test_help_strings_end_with_periods():
"""Make sure click options have help text that end with a period."""
for param in click_entrypoint.params:
if isinstance(param, click.core.Option):
if param.hidden:
continue
assert hasattr(param, "help")
assert param.help.endswith(".")

Expand Down