Compare commits
2 commits
9e2812c542
...
20b475c5f2
| Author | SHA1 | Date | |
|---|---|---|---|
| 20b475c5f2 | |||
| 78b649cf39 |
8 changed files with 15 additions and 9 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
## 0.2.0a44 (2026-01-14)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- yaml in output format do not convert object to str
|
||||||
|
|
||||||
## 0.2.0a43 (2026-01-14)
|
## 0.2.0a43 (2026-01-14)
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail.output_doc"
|
name = "rougail.output_doc"
|
||||||
version = "0.2.0a43"
|
version = "0.2.0a44"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "Rougail output doc"
|
description = "Rougail output doc"
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.2.0a43"
|
__version__ = "0.2.0a44"
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ from ruamel.yaml import CommentedMap
|
||||||
from ruamel.yaml.representer import RoundTripRepresenter
|
from ruamel.yaml.representer import RoundTripRepresenter
|
||||||
|
|
||||||
|
|
||||||
from .utils import _, calc_path
|
from .utils import _, calc_path, dump
|
||||||
|
|
||||||
|
|
||||||
# XXX explicit null (see rougail-output-formatter
|
# XXX explicit null (see rougail-output-formatter
|
||||||
|
|
@ -69,7 +69,7 @@ class Examples: # pylint: disable=no-member,too-few-public-methods
|
||||||
self.formatter.title(
|
self.formatter.title(
|
||||||
_("Example with mandatory variables not filled in"), self.level
|
_("Example with mandatory variables not filled in"), self.level
|
||||||
),
|
),
|
||||||
self.formatter.yaml(examples_mandatories),
|
self.formatter.yaml(dump(examples_mandatories)),
|
||||||
self.formatter.end_family(self.level),
|
self.formatter.end_family(self.level),
|
||||||
])
|
])
|
||||||
if self.examples:
|
if self.examples:
|
||||||
|
|
@ -84,7 +84,7 @@ class Examples: # pylint: disable=no-member,too-few-public-methods
|
||||||
datas.extend([self.formatter.title(
|
datas.extend([self.formatter.title(
|
||||||
_("Example with all variables modifiable"), self.level
|
_("Example with all variables modifiable"), self.level
|
||||||
),
|
),
|
||||||
self.formatter.yaml(examples),
|
self.formatter.yaml(dump(examples)),
|
||||||
self.formatter.end_family(self.level),
|
self.formatter.end_family(self.level),
|
||||||
])
|
])
|
||||||
return self.formatter.compute(datas)
|
return self.formatter.compute(datas)
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ class Formatter(CommonFormatter):
|
||||||
|
|
||||||
def yaml(self, _dump: dict) -> str:
|
def yaml(self, _dump: dict) -> str:
|
||||||
"""Dump yaml part of documentation"""
|
"""Dump yaml part of documentation"""
|
||||||
return f"[,yaml]\n----\n---\n{dump(_dump)}\n----\n"
|
return f"[,yaml]\n----\n---\n{_dump}\n----\n"
|
||||||
|
|
||||||
def tabular(self, with_header: bool = True) -> str:
|
def tabular(self, with_header: bool = True) -> str:
|
||||||
"""Transform list to a tabular in string format
|
"""Transform list to a tabular in string format
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ class Formatter(CommonFormatter):
|
||||||
|
|
||||||
def yaml(self, _dump):
|
def yaml(self, _dump):
|
||||||
"""Dump yaml part of documentation"""
|
"""Dump yaml part of documentation"""
|
||||||
return self.rich_syntaxt(f'---\n{dump(_dump)}', 'yaml')
|
return self.rich_syntaxt(f'---\n{_dump}', 'yaml')
|
||||||
|
|
||||||
def link(
|
def link(
|
||||||
self,
|
self,
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ class Formatter(CommonFormatter):
|
||||||
|
|
||||||
def yaml(self, _dump):
|
def yaml(self, _dump):
|
||||||
"""Dump yaml part of documentation"""
|
"""Dump yaml part of documentation"""
|
||||||
return f"```yaml\n---\n{dump(_dump)}\n```\n"
|
return f"```yaml\n---\n{_dump}\n```\n"
|
||||||
|
|
||||||
def link_variable(self,
|
def link_variable(self,
|
||||||
path: str,
|
path: str,
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ class Formatter(CommonFormatter):
|
||||||
|
|
||||||
def yaml(self, _dump: dict) -> str:
|
def yaml(self, _dump: dict) -> str:
|
||||||
"""Dump yaml part of documentation"""
|
"""Dump yaml part of documentation"""
|
||||||
return f"<pre>{dump(_dump)}</pre>"
|
return f"<pre>{_dump}</pre>"
|
||||||
|
|
||||||
def link(
|
def link(
|
||||||
self,
|
self,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue