diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-07-24 08:33:04 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-07-24 10:02:39 +0200 |
commit | d9fa7d6ae3ea304cde86b22b149f1abae4fd9636 (patch) | |
tree | afd390df2f8174e1a8f8bbac2159e9a38f091a2a | |
parent | 895ca2835d52e71ec9cea7575c1dbbe044ae1193 (diff) |
interfacedoc: Simplify interface references
-rw-r--r-- | rtemsspec/interfacedoc.py | 2 | ||||
-rw-r--r-- | 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() <InterfaceVeryLongFunction>` - Very long function - brief description. +* :ref:`InterfaceVeryLongFunction` - Very long function brief description. -* :ref:`VeryLongTypeFunction() <InterfaceVeryLongTypeFunction>` - Function - brief description with very long return type. +* :ref:`InterfaceVeryLongTypeFunction` - Function brief description with very + long return type. -* :ref:`VoidFunction() <InterfaceVoidFunction>` +* :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() <InterfaceFunction>`. + 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() <InterfaceFunction>` - 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() - <InterfaceVeryLongFunction>`, 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() |