[rtems-central commit] specview.py: More attribute substitutions

Sebastian Huber sebh at rtems.org
Thu Nov 25 08:20:27 UTC 2021


Module:    rtems-central
Branch:    master
Commit:    cef12a31f66e35b2e4b05fd18e881ebabe51de97
Changeset: http://git.rtems.org/rtems-central/commit/?id=cef12a31f66e35b2e4b05fd18e881ebabe51de97

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Nov 24 17:24:37 2021 +0100

specview.py: More attribute substitutions

---

 specview.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/specview.py b/specview.py
index 964bacf..5c5813c 100755
--- a/specview.py
+++ b/specview.py
@@ -91,6 +91,17 @@ def _info(item: Item) -> str:
         return ""
 
 
+_TEXT_ATTRIBUTES = [
+    "brief",
+    "description",
+    "notes",
+    "rationale",
+    "test-brief",
+    "test-description",
+    "text",
+]
+
+
 def _visit_item(item: Item, level: int, role: Optional[str],
                 validated_filter: str) -> bool:
     validated = item.get("_validated", True)
@@ -101,7 +112,7 @@ def _visit_item(item: Item, level: int, role: Optional[str],
     role_info = "" if role is None else f", role={role}"
     print(
         f"{'  ' * level}{item.uid} (type={item.type}{role_info}{_info(item)})")
-    for name in ["text", "brief", "description", "notes", "rationale"]:
+    for name in _TEXT_ATTRIBUTES:
         if name in item:
             _MAPPER.substitute(item[name], item)
     try:



More information about the vc mailing list