Skip to content

Commit

Permalink
expand schema docstring internally (#4926)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwsutherland authored Jun 23, 2022
1 parent 60bf209 commit 2c1ecf8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ in `global.cylc[install]source dirs`.

### Fixes

[#4926](https://github.com/cylc/cylc-flow/pull/4926) - Fix a docstring
formatting problem presenting in the UI mutation flow argument info.

[#4891](https://github.com/cylc/cylc-flow/pull/4891) - Fix bug that could cause
past jobs to be omitted in the UI.

Expand Down
12 changes: 3 additions & 9 deletions cylc/flow/network/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -1391,15 +1391,9 @@ def description(self):


class Flow(String):
"""An integer or one of {FLOW_ALL}, {FLOW_NEW} or {FLOW_NONE}."""


# NOTE: docstrings can't be f-strings so we must manually format it.
Flow.__doc__ = Flow.__doc__.format( # type: ignore[union-attr]
FLOW_ALL=FLOW_ALL,
FLOW_NEW=FLOW_NEW,
FLOW_NONE=FLOW_NONE,
)
__doc__ = (
f"""An integer or one of {FLOW_ALL}, {FLOW_NEW} or {FLOW_NONE}."""
)


# Mutations:
Expand Down

0 comments on commit 2c1ecf8

Please sign in to comment.