summaryrefslogtreecommitdiffstats
path: root/tools/update-dbus-docs.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
commitfc53809803cd2bc2434e312b19a18fa36776da12 (patch)
treeb4b43bd6538f51965ce32856e9c053d0f90919c8 /tools/update-dbus-docs.py
parentAdding upstream version 255.5. (diff)
downloadsystemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz
systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/update-dbus-docs.py')
-rwxr-xr-xtools/update-dbus-docs.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/update-dbus-docs.py b/tools/update-dbus-docs.py
index 008f7d4..ce7161c 100755
--- a/tools/update-dbus-docs.py
+++ b/tools/update-dbus-docs.py
@@ -152,12 +152,17 @@ def check_documented(document, declarations, stats, interface, missing_version):
stats['total'] += len(items)
for item in items:
- if klass == 'method':
+ if klass in ('method', 'signal'):
elem = 'function'
item_repr = f'{item}()'
- elif klass == 'signal':
- elem = 'function'
- item_repr = item
+
+ # Find all functions/signals in <function> elements that are not
+ # suffixed with '()' and fix them
+ for section in sections:
+ element = section.find(f".//{elem}[. = '{item}']")
+ if element is not None:
+ element.text = item_repr
+
elif klass == 'property':
elem = 'varname'
item_repr = item
@@ -259,7 +264,7 @@ def subst_output(document, programlisting, stats, missing_version):
variablelist = etree.Element("variablelist")
variablelist.attrib['class'] = 'dbus-'+decl_type
variablelist.attrib['generated'] = 'True'
- if decl_type == 'method' :
+ if decl_type in ('method', 'signal'):
variablelist.attrib['extra-ref'] = declaration + '()'
else:
variablelist.attrib['extra-ref'] = declaration