Skip to content

Commit

Permalink
Fix blackened string concatenation
Browse files Browse the repository at this point in the history
Several string literals got moved to one line by black, but didn't get
merged -- the result is odd and undesirable.
Although people want Black to make the jump to editing AST for cases
exactly like this ( psf/black#26 ), it's
doubtful that will happen anytime soon.

I would not be surprised, based on that thread, if black just waits for
py3.6 to EOL and to support 3.7+ with this.
  • Loading branch information
sirosen committed Jul 19, 2019
1 parent 000a927 commit 40c3bc6
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 39 deletions.
2 changes: 1 addition & 1 deletion globus_cli/commands/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@click.command(
"delete",
short_help="Submit a delete task (asynchronous)",
help=("Delete a file or directory from one endpoint as an " "asynchronous task."),
help="Delete a file or directory from one endpoint as an asynchronous task.",
)
@common_options
@task_submission_options
Expand Down
10 changes: 3 additions & 7 deletions globus_cli/commands/endpoint/activate.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@
"--web",
is_flag=True,
default=False,
help=(
"Use web activation. Mutually exclusive with --myproxy " "and --delegate-proxy."
),
help="Use web activation. Mutually exclusive with --myproxy and --delegate-proxy.",
)
@click.option(
"--no-browser",
Expand All @@ -83,9 +81,7 @@
"--myproxy",
is_flag=True,
default=False,
help=(
"Use myproxy activation. Mutually exclusive with --web " "and --delegate-proxy."
),
help="Use myproxy activation. Mutually exclusive with --web and --delegate-proxy.",
)
@click.option(
"--myproxy-username",
Expand Down Expand Up @@ -259,7 +255,7 @@ def endpoint_activate(

# web activation
elif web:
url = "https://app.globus.org/file-manager" "?origin_id={}".format(endpoint_id)
url = "https://app.globus.org/file-manager?origin_id={}".format(endpoint_id)
if no_browser or is_remote_session():
res = {"message": "Web activation url: {}".format(url), "url": url}
else:
Expand Down
2 changes: 1 addition & 1 deletion globus_cli/commands/endpoint/permission/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


@globus_group(
name="permission", help=("Manage endpoint permissions " "(Access Control Lists)")
name="permission", help="Manage endpoint permissions (Access Control Lists)"
)
def permission_command():
pass
Expand Down
4 changes: 2 additions & 2 deletions globus_cli/commands/endpoint/permission/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


@click.command(
"create", help=("Create an access control rule, allowing new " "permissions")
"create", help="Create an access control rule, allowing new permissions"
)
@common_options
@security_principal_opts(
Expand All @@ -26,7 +26,7 @@
@click.option(
"--notify-email",
metavar="EMAIL_ADDRESS",
help=("An email address to notify that " "the permission has been added"),
help="An email address to notify that the permission has been added",
)
@click.option(
"--notify-message",
Expand Down
2 changes: 1 addition & 1 deletion globus_cli/commands/endpoint/permission/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


@click.command(
"delete", help=("Delete an access control rule, removing " "permissions")
"delete", help="Delete an access control rule, removing permissions"
)
@common_options
@endpoint_id_arg
Expand Down
2 changes: 1 addition & 1 deletion globus_cli/commands/endpoint/permission/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@click.command(
"update",
help=("Update an access control rule, changing " "permissions on an endpoint"),
help="Update an access control rule, changing permissions on an endpoint",
)
@endpoint_id_arg
@common_options
Expand Down
2 changes: 1 addition & 1 deletion globus_cli/commands/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

@click.command(
"login",
short_help=("Log into Globus to get credentials for " "the Globus CLI"),
short_help="Log into Globus to get credentials for the Globus CLI",
help=(
"Get credentials for the Globus CLI. "
"Necessary before any Globus CLI commands which require "
Expand Down
4 changes: 2 additions & 2 deletions globus_cli/commands/ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"-l",
"long_output",
is_flag=True,
help=("For text output only. Do long form output, kind " "of like `ls -l`"),
help="For text output only. Do long form output, kind of like `ls -l`",
)
@click.option(
"--filter",
Expand All @@ -63,7 +63,7 @@
"-r",
is_flag=True,
show_default=True,
help=("Do a recursive listing, up to the depth limit. " "Similar to `ls -R`"),
help="Do a recursive listing, up to the depth limit. Similar to `ls -R`",
)
@click.option(
"--recursive-depth-limit",
Expand Down
8 changes: 3 additions & 5 deletions globus_cli/commands/task/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ def _format_date_callback(ctx, param, value):
"--filter-status",
multiple=True,
type=click.Choice(["ACTIVE", "INACTIVE", "FAILED", "SUCCEEDED"]),
help=(
"Task status to filter results by. " "This option can be used multiple times."
),
help="Task status to filter results by. This option can be used multiple times.",
)
@click.option(
"--filter-label",
Expand All @@ -54,8 +52,8 @@ def _format_date_callback(ctx, param, value):
"--inexact / --exact",
default=True,
help=(
"Allows / disallows --filter-label and --filter-not-label to use"
" '*' as a wild-card character and ignore case"
"Allows / disallows --filter-label and --filter-not-label to use "
"'*' as a wild-card character and ignore case"
),
)
@click.option(
Expand Down
4 changes: 2 additions & 2 deletions globus_cli/commands/transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"-r",
is_flag=True,
help=(
"SOURCE_PATH and DEST_PATH are both directories, do a " "recursive dir transfer"
"SOURCE_PATH and DEST_PATH are both directories, do a recursive dir transfer"
),
)
@click.option(
Expand Down Expand Up @@ -176,7 +176,7 @@ def transfer_command(

if (cmd_source_path is None or cmd_dest_path is None) and (not batch):
raise click.UsageError(
("transfer requires either SOURCE_PATH and DEST_PATH or " "--batch")
"transfer requires either SOURCE_PATH and DEST_PATH or --batch"
)

# because python can't handle multiple **kwargs expansions in a single
Expand Down
4 changes: 2 additions & 2 deletions globus_cli/commands/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def update_command(yes, development, development_version):
# pip, anyone doing this is forced to get two copies of pip, which seems
# kind of nasty (even if "they're asking for it")
if not _check_pip_installed():
click.echo("`globus update` requires pip. " "Please install pip and try again")
click.echo("`globus update` requires pip. Please install pip and try again")
click.get_current_context().exit(1)

# --development-version implies --development
Expand All @@ -90,7 +90,7 @@ def update_command(yes, development, development_version):
# default to master
development_version = development_version or "master"
target_version = (
"https://github.com/globus/globus-cli/archive/{}" ".tar.gz#egg=globus-cli"
"https://github.com/globus/globus-cli/archive/{}.tar.gz#egg=globus-cli"
).format(development_version)
else:
# lookup version from PyPi, abort if we can't get it
Expand Down
4 changes: 1 addition & 3 deletions globus_cli/commands/whoami.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
@click.option(
"--linked-identities",
is_flag=True,
help=(
"Also show identities linked to the currently logged-in " "primary identity."
),
help="Also show identities linked to the currently logged-in primary identity.",
)
def whoami_command(linked_identities):
"""
Expand Down
2 changes: 1 addition & 1 deletion globus_cli/helpers/delegate_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def confirm_not_old_proxy(loaded_cert):
# if the last CN is 'proxy' or 'limited proxy' we are in an old proxy
if last_cn.value in ("proxy", "limited proxy"):
raise ValueError(
"Proxy certificate is in an outdated format " "that is no longer supported"
"Proxy certificate is in an outdated format that is no longer supported"
)


Expand Down
6 changes: 2 additions & 4 deletions globus_cli/helpers/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@ def print_version():
latest, current = get_versions()
if latest is None:
click.echo(
("Installed Version: {0}\n" "Failed to lookup latest version.").format(
current
)
("Installed Version: {0}\nFailed to lookup latest version.").format(current)
)
else:
click.echo(
("Installed Version: {0}\n" "Latest Version: {1}\n" "\n{2}").format(
("Installed Version: {0}\nLatest Version: {1}\n\n{2}").format(
current,
latest,
"You are running the latest version of the Globus CLI"
Expand Down
2 changes: 1 addition & 1 deletion globus_cli/parsing/one_use_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def one_use_option(*args, **kwargs):
# cannot force a multiple or count option to be single use
if "multiple" in kwargs or "count" in kwargs:
raise ValueError(
"Internal error, one_use_option cannot be used " "with multiple or count."
"Internal error, one_use_option cannot be used with multiple or count."
)

# cannot force a non Option Paramater (argument) to be a OneUseOption
Expand Down
10 changes: 5 additions & 5 deletions globus_cli/parsing/shared_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def inner_decorator(f, create=False):
)(f)
f = click.option(
"--myproxy-server",
help=("Set the MyProxy Server URI " "(Globus Connect Server only)"),
help="Set the MyProxy Server URI (Globus Connect Server only)",
)(f)
f = click.option(
"--oauth-server",
Expand Down Expand Up @@ -300,7 +300,7 @@ def validate_endpoint_create_and_update_params(endpoint_type, managed, params):
# catch params with two option flags
if params["public"] is False:
raise click.UsageError(
"Option --private only allowed " "for Globus Connect Server endpoints"
"Option --private only allowed for Globus Connect Server endpoints"
)
# catch any params only usable with GCS
for option in [
Expand Down Expand Up @@ -497,7 +497,7 @@ def format_deadline_callback(ctx, param, value):
f = click.option(
"--dry-run",
is_flag=True,
help=("Don't actually submit the task, print submission " "data instead"),
help="Don't actually submit the task, print submission data instead",
)(f)
f = click.option(
"--notify",
Expand Down Expand Up @@ -528,7 +528,7 @@ def format_deadline_callback(ctx, param, value):
f = click.option(
"--skip-activation-check",
is_flag=True,
help=("Submit the task even if the endpoint(s) " "aren't currently activated."),
help="Submit the task even if the endpoint(s) aren't currently activated.",
)(f)

return f
Expand Down Expand Up @@ -767,7 +767,7 @@ def decorator(*args, **kwargs):

if identity and provision_identity:
raise click.UsageError(
"Only one of --identity or --provision-identity " "allowed"
"Only one of --identity or --provision-identity allowed"
)
if kwargs.get("principal") is not None:
if has_identity or group:
Expand Down

0 comments on commit 40c3bc6

Please sign in to comment.