diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-01-03 11:09:27 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-01-03 13:36:14 +0100 |
commit | c1a4100861ac5eee66465c949b4e78566644d869 (patch) | |
tree | 7a24c0f8406f1604c7e90c396aa7a547545e2abe /rtemsspec/sphinxcontent.py | |
parent | Add Github CI (diff) | |
download | rtems-central-c1a4100861ac5eee66465c949b4e78566644d869.tar.bz2 |
Format with yapf version 0.32.0
Diffstat (limited to 'rtemsspec/sphinxcontent.py')
-rw-r--r-- | rtemsspec/sphinxcontent.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rtemsspec/sphinxcontent.py b/rtemsspec/sphinxcontent.py index d9a73564..307bb837 100644 --- a/rtemsspec/sphinxcontent.py +++ b/rtemsspec/sphinxcontent.py @@ -62,6 +62,7 @@ def _simple_row(row: Iterable[str], maxi: Iterable[int]) -> str: class SphinxContent(Content): """ This class builds Sphinx content. """ + def __init__(self, section_level: int = 2): super().__init__("CC-BY-SA-4.0", True) self._tab = " " @@ -100,6 +101,7 @@ class SphinxContent(Content): definition: GenericContent, wrap: bool = False) -> None: """ Adds a definition item the content. """ + @contextmanager def _definition_item_context(content: Content) -> Iterator[None]: content.append(name) @@ -266,6 +268,7 @@ def _get_value_sphinx_unspecified_type(ctx: ItemGetValueContext) -> Any: class SphinxMapper(ItemMapper): """ Sphinx item mapper. """ + def __init__(self, item: Item, recursive: bool = False): super().__init__(item, recursive) self.add_get_value("glossary/term:/term", _get_ref_term) @@ -317,6 +320,7 @@ def _get_param(ctx: ItemGetValueContext) -> Any: class SphinxInterfaceMapper(SphinxMapper): """ Sphinx item mapper for the interface documentation. """ + def __init__(self, item: Item, group_uids: List[str], |