forked from cylc/cylc-flow
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix docs indentation #68
Merged
wxtim
merged 1 commit into
wxtim:feature.commas-in-install_target_sections
from
MetRonnie:dedent-fun
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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<syntax>`. | ||
Which will then be combined according to | ||
:ref:`the rules for Cylc config syntax<syntax>`. | ||
|
||
''' | ||
|
||
|
@@ -1165,9 +1165,9 @@ def default_for( | |
|
||
.. versionadded:: 8.0.0 | ||
"""): | ||
with Conf('<install target>', desc=""" | ||
with Conf('<install target>', desc=dedent(""" | ||
:ref:`Host <Install targets>` 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('<platform name>', desc=f''' | ||
with Conf('<platform name>', 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}]]``. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (As I've made it not an f-string anymore) |
||
|
||
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('<custom metadata>', VDR.V_STRING, '', desc=''' | ||
Any user-defined metadata item. | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how it's done elsewhere:
cylc/cylc/flow/cfgspec/workflow.py
Lines 1516 to 1519 in 6eb8f61