From 640381a568fb8c1605b02c84f1628f4b313ca30b Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Wed, 20 Nov 2024 08:58:22 +0000 Subject: [PATCH] Fix docs indentation (#68) --- cylc/flow/cfgspec/globalcfg.py | 50 +++++++++++++++++----------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/cylc/flow/cfgspec/globalcfg.py b/cylc/flow/cfgspec/globalcfg.py index 582fdb6476..5dd20ee4f0 100644 --- a/cylc/flow/cfgspec/globalcfg.py +++ b/cylc/flow/cfgspec/globalcfg.py @@ -18,7 +18,7 @@ import os from pathlib import Path from sys import stderr -from textwrap import dedent, indent +from textwrap import dedent from typing import List, Optional, Tuple, Any, Union from contextlib import suppress @@ -590,34 +590,34 @@ COMMA_SEPARATED_SECTION_NOTE = ''' - .. note:: +.. note:: - This section can be a comma separated list. + This section can be a comma separated list. - .. spoiler:: Example + .. spoiler:: Example - For example: + For example: - .. code-block:: cylc + .. code-block:: cylc - [a, b] - setting = x - [a] - another_setting = y + [a, b] + setting = x + [a] + another_setting = y - Will become: + Will become: - .. code-block:: cylc + .. code-block:: cylc - [a] - setting = x - [b] - setting = x - [a] - another_setting = y + [a] + setting = x + [b] + setting = x + [a] + another_setting = y - Which will then be combined according to - :ref:`the rules for Cylc config syntax`. + Which will then be combined according to + :ref:`the rules for Cylc config syntax`. ''' @@ -1165,9 +1165,9 @@ def default_for( .. versionadded:: 8.0.0 """): - with Conf('', desc=""" + with Conf('', desc=dedent(""" :ref:`Host ` on which to create the symlinks. - """ + COMMA_SEPARATED_SECTION_NOTE): + """) + COMMA_SEPARATED_SECTION_NOTE): Conf('run', VDR.V_STRING, None, desc=""" Alternative location for the run dir. @@ -1243,7 +1243,7 @@ def default_for( .. versionadded:: 8.0.0 '''): - with Conf('', desc=f''' + with Conf('', desc=dedent(''' Configuration defining a platform. Many of these settings have replaced those of the same name from @@ -1253,7 +1253,7 @@ def default_for( Platform names can be regular expressions: If you have a set of compute resources such as ``bigmachine1, bigmachine2`` or ``desktop0000, .., desktop9999`` one would define platforms with - names ``[[bigmachine[12]]]`` and ``[[desktop[0-9]{{4}}]]``. + names ``[[bigmachine[12]]]`` and ``[[desktop[0-9]{4}]]``. Cylc searches for a matching platform in the reverse of the definition order to allow user defined platforms @@ -1289,7 +1289,7 @@ def default_for( .. versionadded:: 8.0.0 - ''' + indent(COMMA_SEPARATED_SECTION_NOTE, ' ' * 3)) as Platform: + ''') + COMMA_SEPARATED_SECTION_NOTE) as Platform: with Conf('meta', desc=PLATFORM_META_DESCR): Conf('', VDR.V_STRING, '', desc=''' Any user-defined metadata item.