From d9fa7d6ae3ea304cde86b22b149f1abae4fd9636 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 24 Jul 2020 08:33:04 +0200 Subject: interfacedoc: Simplify interface references --- rtemsspec/interfacedoc.py | 2 +- rtemsspec/tests/test_interfacedoc.py | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/rtemsspec/interfacedoc.py b/rtemsspec/interfacedoc.py index 5843bb0f..81e1d3c6 100644 --- a/rtemsspec/interfacedoc.py +++ b/rtemsspec/interfacedoc.py @@ -46,7 +46,7 @@ def _forward_declaration(item: Item) -> str: def _get_reference(name: str) -> str: - return get_reference(get_label(f"{INTERFACE}{name}"), f"{name}()") + return get_reference(get_label(f"{INTERFACE} {name}")) def _get_value_forward_declaration(ctx: ItemGetValueContext) -> Any: diff --git a/rtemsspec/tests/test_interfacedoc.py b/rtemsspec/tests/test_interfacedoc.py index b9948fc8..911fc42f 100644 --- a/rtemsspec/tests/test_interfacedoc.py +++ b/rtemsspec/tests/test_interfacedoc.py @@ -63,13 +63,12 @@ Introduction The directives provided by the Group B are: -* :ref:`VeryLongFunction() ` - Very long function - brief description. +* :ref:`InterfaceVeryLongFunction` - Very long function brief description. -* :ref:`VeryLongTypeFunction() ` - Function - brief description with very long return type. +* :ref:`InterfaceVeryLongTypeFunction` - Function brief description with very + long return type. -* :ref:`VoidFunction() ` +* :ref:`InterfaceVoidFunction` """ assert content == src.read() @@ -121,7 +120,7 @@ DIRECTIVE RETURN VALUES: 2 is returned, in case B. - Sometimes some value. See :ref:`Function() `. + Sometimes some value. See :ref:`InterfaceFunction`. DESCRIPTION: VeryLongFunction description. @@ -177,7 +176,7 @@ Group A brief description. Group A description. The directives provided by the Group A are: -* :ref:`Function() ` - Function brief description. +* :ref:`InterfaceFunction` - Function brief description. """ assert content == src.read() @@ -217,8 +216,8 @@ DIRECTIVE PARAMETERS: This parameter is parameter 3. DESCRIPTION: - Function description. References to :ref:`VeryLongFunction() - `, Integer, Enum, DEFINE, VERY_LONG_MACRO, - Variable, ENUMERATOR_0, Struct, :ref:`a`, and interface. + Function description. References to :ref:`InterfaceVeryLongFunction`, + Integer, Enum, DEFINE, VERY_LONG_MACRO, Variable, ENUMERATOR_0, Struct, + :ref:`a`, and interface. """ assert content == src.read() -- cgit v1.2.3