Skip to content

Commit

Permalink
Docs: Fix doc for optional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-berchet committed Sep 4, 2023
1 parent 3c493f5 commit 2177b44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def maybe_skip_member(app, what, name, obj, skip, options):
obj.docstring = cli.format_description(
actual_obj,
default_str="{doc}\n\n:default value: {default}",
optional_str="(optional) {doc}",
optional_str="(Optional) {doc}",
type_str="{doc}\n\n:type: {type}",
choices_str="{doc}\n\n:choices: {choices}",
interval_str="{doc}\n\n:permitted values: {interval}",
Expand Down
2 changes: 1 addition & 1 deletion src/synthesis_workflow/tasks/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def format_description(
try:
param_doc, param_type, choices, interval, optional = _process_param(param)
if optional:
param_doc = optional_str + param_doc
param_doc = optional_str.format(doc=param_doc)
if param_type is not None:
param_doc = type_str.format(doc=param_doc, type=param_type.replace(":", ""))
if choices is not None:
Expand Down

0 comments on commit 2177b44

Please sign in to comment.