Skip to content

Commit

Permalink
fix flake8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Oct 27, 2023
1 parent 04ad456 commit ad511e4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
4 changes: 4 additions & 0 deletions changes.d/5794.break.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Remove `cylc report-timings` from automatic installation with
`pip install cylc-flow[all]`. If you now wish to
install it use `pip install cylc-flow[report-timings]`.
Cylc Report timings will no longer work at Python 3.12.
17 changes: 10 additions & 7 deletions cylc/flow/cfgspec/globalcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,9 @@ def default_for(
{PLATFORM_REPLACES.format("[job]batch system")}
''')
replaces = PLATFORM_REPLACES.format(
"[job]batch submit command template"
)
Conf('job runner command template', VDR.V_STRING, desc=f'''
Set the command used by the chosen job runner.
Expand All @@ -1230,9 +1233,7 @@ def default_for(
.. versionadded:: 8.0.0
{PLATFORM_REPLACES.format(
"[job]batch submit command template"
)}
{replaces}
''')
Conf('shell', VDR.V_STRING, '/bin/bash', desc='''
Expand Down Expand Up @@ -1465,16 +1466,19 @@ def default_for(
{REPLACES}``global.rc[hosts][<host>]retrieve job logs
command``.
''')
replaces = PLATFORM_REPLACES.format(
"[remote]retrieve job logs max size")
Conf('retrieve job logs max size', VDR.V_STRING, desc=f'''
{LOG_RETR_SETTINGS['retrieve job logs max size']}
.. versionchanged:: 8.0.0
{REPLACES}``global.rc[hosts][<host>]retrieve job logs
max size``.
{PLATFORM_REPLACES.format(
"[remote]retrieve job logs max size")}
{replaces}
''')
replaces = PLATFORM_REPLACES.format(
"[remote]retrieve job logs retry delays")
Conf('retrieve job logs retry delays', VDR.V_INTERVAL_LIST,
desc=f'''
{LOG_RETR_SETTINGS['retrieve job logs retry delays']}
Expand All @@ -1483,8 +1487,7 @@ def default_for(
{REPLACES}``global.rc[hosts][<host>]retrieve job logs
retry delays``.
{PLATFORM_REPLACES.format(
"[remote]retrieve job logs retry delays")}
{replaces}
''')
Conf('tail command template',
VDR.V_STRING, 'tail -n +1 --follow=name %(filename)s',
Expand Down
10 changes: 5 additions & 5 deletions cylc/flow/cfgspec/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def get_script_common_text(this: str, example: Optional[str] = None):
# differentiate between not set vs set to empty
default = None
elif item.endswith("handlers"):
desc = desc + '\n\n' + dedent(rf'''
desc = desc + '\n\n' + dedent(f'''
Examples:
.. code-block:: cylc
Expand All @@ -413,9 +413,9 @@ def get_script_common_text(this: str, example: Optional[str] = None):
{item} = echo %(workflow)s
# configure multiple event handlers
{item} = \
'echo %(workflow)s, %(event)s', \
'my_exe %(event)s %(message)s' \
{item} = \\
'echo %(workflow)s, %(event)s', \\
'my_exe %(event)s %(message)s' \\
'curl -X PUT -d event=%(event)s host:port'
''')
elif item.startswith("abort on"):
Expand Down Expand Up @@ -1856,7 +1856,7 @@ def upg(cfg, descr):
['scheduling', 'max active cycle points'],
['scheduling', 'runahead limit'],
cvtr=converter(
lambda x: f'P{int(x)-1}' if x != '' else '',
lambda x: f'P{int(x) - 1}' if x != '' else '',
'"{old}" -> "{new}"'
),
silent=cylc.flow.flags.cylc7_back_compat,
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/id.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def duplicate(
)?
(?:
# cycle/task/job
{ RELATIVE_PATTERN }
{RELATIVE_PATTERN}
)?
)?
)?
Expand Down

0 comments on commit ad511e4

Please sign in to comment.