mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Clean up string formatting issues from black migration
This commit is contained in:
@@ -13,7 +13,7 @@ class SystemJobTemplate(UnifiedJobTemplate, HasNotifications):
|
||||
|
||||
# return job
|
||||
jobs_pg = self.get_related('jobs', id=result.json['system_job'])
|
||||
assert jobs_pg.count == 1, "system_job_template launched (id:%s) but unable to find matching " "job at %s/jobs/" % (result.json['job'], self.url)
|
||||
assert jobs_pg.count == 1, "system_job_template launched (id:%s) but unable to find matching job at %s/jobs/" % (result.json['job'], self.url)
|
||||
return jobs_pg.results[0]
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class UnifiedJob(HasStatus, base.Base):
|
||||
Default behavior is to replace newline characters with a space, but this can be modified, including replacement
|
||||
with ''. Pass replace_newlines=None to disable.
|
||||
|
||||
Additionally, you may replace any ' ' with another character (including ''). This is applied after the newline
|
||||
Additionally, you may replace any with another character (including ''). This is applied after the newline
|
||||
replacement. Default behavior is to not replace spaces.
|
||||
"""
|
||||
self.wait_until_completed()
|
||||
@@ -147,7 +147,7 @@ class UnifiedJob(HasStatus, base.Base):
|
||||
if host_loc.startswith(expected_prefix):
|
||||
return host_loc
|
||||
raise RuntimeError(
|
||||
'Could not find a controller private_data_dir for this job. ' 'Searched for volume mount to {} inside of args {}'.format(expected_prefix, job_args)
|
||||
'Could not find a controller private_data_dir for this job. Searched for volume mount to {} inside of args {}'.format(expected_prefix, job_args)
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ def format_jq(output, fmt):
|
||||
if fmt == '.':
|
||||
return output
|
||||
raise ImportError(
|
||||
'To use `-f jq`, you must install the optional jq dependency.\n' '`pip install jq`\n',
|
||||
'To use `-f jq`, you must install the optional jq dependency.\n`pip install jq`\n',
|
||||
'Note that some platforms may require additional programs to '
|
||||
'build jq from source (like `libtool`).\n'
|
||||
'See https://pypi.org/project/jq/ for instructions.',
|
||||
|
||||
@@ -55,7 +55,7 @@ def pk_or_name(v2, model_name, value, page=None):
|
||||
return int(results.results[0].id)
|
||||
if results.count > 1:
|
||||
raise argparse.ArgumentTypeError(
|
||||
'Multiple {0} exist with that {1}. ' 'To look up an ID, run:\n' 'awx {0} list --{1} "{2}" -f human'.format(model_name, identity, value)
|
||||
'Multiple {0} exist with that {1}. To look up an ID, run:\nawx {0} list --{1} "{2}" -f human'.format(model_name, identity, value)
|
||||
)
|
||||
raise argparse.ArgumentTypeError('Could not find any {0} with that {1}.'.format(model_name, identity))
|
||||
|
||||
@@ -119,7 +119,7 @@ class ResourceOptionsParser(object):
|
||||
'--all',
|
||||
dest='all_pages',
|
||||
action='store_true',
|
||||
help=('fetch all pages of content from the API when ' 'returning results (instead of just the first page)'),
|
||||
help=('fetch all pages of content from the API when returning results (instead of just the first page)'),
|
||||
)
|
||||
parser.add_argument(
|
||||
'--order_by',
|
||||
|
||||
@@ -22,7 +22,7 @@ class CustomAutoprogramDirective(AutoprogramDirective):
|
||||
nodes[0][0].children = [heading]
|
||||
|
||||
# add a descriptive top synopsis of the reference guide
|
||||
nodes[0].children.insert(1, paragraph(text=('This is an exhaustive guide of every available command in ' 'the awx CLI tool.')))
|
||||
nodes[0].children.insert(1, paragraph(text=('This is an exhaustive guide of every available command in the awx CLI tool.')))
|
||||
disclaimer = (
|
||||
'The commands and parameters documented here can (and will) '
|
||||
'vary based on a variety of factors, such as the AWX API '
|
||||
|
||||
@@ -33,7 +33,7 @@ def parse_args():
|
||||
'--project-file',
|
||||
dest='project_file',
|
||||
default=os.getenv('AWXKIT_PROJECT_FILE'),
|
||||
help='Path for yml project config file.' 'If not provided or set by AWXKIT_PROJECT_FILE, projects will not have default SCM_URL',
|
||||
help='Path for yml project config file.If not provided or set by AWXKIT_PROJECT_FILE, projects will not have default SCM_URL',
|
||||
)
|
||||
parser.add_argument('-f', '--file', dest='akit_script', default=False, help='akit script file to run in interactive session.')
|
||||
parser.add_argument('-x', '--non-interactive', action='store_true', dest='non_interactive', help='Do not run in interactive mode.')
|
||||
|
||||
Reference in New Issue
Block a user