diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:42 +0000 |
commit | 78e9bb837c258ac0ec7712b3d612cc2f407e731e (patch) | |
tree | f515d16b6efd858a9aeb5b0ef5d6f90bf288283d /tools/update-dbus-docs.py | |
parent | Adding debian version 255.5-1. (diff) | |
download | systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.tar.xz systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.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-x | tools/update-dbus-docs.py | 15 |
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 |