Skip to content

Commit

Permalink
Merge pull request #1015 from sirosen/remove-autoactivate-helptext
Browse files Browse the repository at this point in the history
Remove autoactivate helptext from commands
  • Loading branch information
sirosen authored Jul 29, 2024
2 parents c66aa5c + ea552b6 commit 6e51f1e
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 24 deletions.
2 changes: 0 additions & 2 deletions src/globus_cli/commands/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ def delete_command(
\b
If you use `--batch` and supply a PATH via the commandline, the commandline PATH is
treated as a prefix to all of the paths read from the `--batch` input.
{AUTOMATIC_ACTIVATION}
"""
endpoint_id, path = endpoint_plus_path
transfer_client = login_manager.get_transfer_client()
Expand Down
2 changes: 0 additions & 2 deletions src/globus_cli/commands/ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ def ls_command(
\b
"~*.txt" matches all .txt files, for example
{AUTOMATIC_ACTIVATION}
"""
from globus_sdk.services.transfer.response import IterableTransferResponse

Expand Down
5 changes: 1 addition & 4 deletions src/globus_cli/commands/mkdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ def mkdir_command(
endpoint_plus_path: tuple[uuid.UUID, str],
local_user: str | None,
) -> None:
"""Make a directory on an endpoint at the given path.
{AUTOMATIC_ACTIVATION}
"""
"""Make a directory on an endpoint at the given path."""
endpoint_id, path = endpoint_plus_path
transfer_client = login_manager.get_transfer_client()

Expand Down
2 changes: 0 additions & 2 deletions src/globus_cli/commands/rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ def rm_command(
on a *globus rm* which timed out.
Symbolic links are never followed - only unlinked (deleted).
{AUTOMATIC_ACTIVATION}
"""
endpoint_id, path = endpoint_plus_path
transfer_client = login_manager.get_transfer_client()
Expand Down
2 changes: 0 additions & 2 deletions src/globus_cli/commands/transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,6 @@ def transfer_command(
For example, `globus transfer --include "*.txt" --exclude "*" ...` will
only transfer files ending in .txt found within the directory structure.
{AUTOMATIC_ACTIVATION}
"""
from globus_cli.services.transfer import add_batch_to_transfer_data

Expand Down
12 changes: 0 additions & 12 deletions src/globus_cli/parsing/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@ def example_command(*, foo_bar: list[tuple[Literal["foo", "bar"], Any]]):
"""

AUTOMATIC_ACTIVATION_HELPTEXT = """=== Automatic Endpoint Activation
This command requires all endpoints it uses to be activated. It will attempt to
auto-activate any endpoints that are not active, but if auto-activation fails,
you will need to manually activate the endpoint. See 'globus endpoint activate'
for more details."""

def __init__(self, *args: t.Any, **kwargs: t.Any) -> None:
self.adoc_output = kwargs.pop("adoc_output", None)
self.adoc_examples = kwargs.pop("adoc_examples", None)
Expand All @@ -72,11 +65,6 @@ def __init__(self, *args: t.Any, **kwargs: t.Any) -> None:
self.adoc_synopsis = kwargs.pop("adoc_synopsis", None)
self.opts_to_combine = kwargs.pop("opts_to_combine", {})

helptext = kwargs.pop("help", None)
if helptext:
kwargs["help"] = helptext.format(
AUTOMATIC_ACTIVATION=self.AUTOMATIC_ACTIVATION_HELPTEXT
)
if "context_settings" not in kwargs:
kwargs["context_settings"] = {}
if "max_content_width" not in kwargs["context_settings"]:
Expand Down

0 comments on commit 6e51f1e

Please sign in to comment.