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:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:45 +0000
commitefeb864cb547a2cbf96dc0053a8bdb4d9190b364 (patch)
treec0b83368f18be983fcc763200c4c24d633244588 /tools/update-dbus-docs.py
parentReleasing progress-linux version 255.5-1~progress7.99u1. (diff)
downloadsystemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.tar.xz
systemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.zip
Merging upstream version 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