From c1a4100861ac5eee66465c949b4e78566644d869 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 3 Jan 2023 11:09:27 +0100 Subject: Format with yapf version 0.32.0 --- rtemsspec/sphinxcontent.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rtemsspec/sphinxcontent.py') 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], -- cgit v1.2.3