mirror of
https://github.com/systemd/systemd.git
synced 2025-09-10 22:52:49 +02:00
tools: ignore root element explicitly in check-version-history
Currently these messages (broken for length)
2025-08-20T12:04:15.9609277Z
/home/runner/work/systemd/systemd/tools/check-version-history.py:26:
FutureWarning: This search incorrectly ignores the root element, and will be fixed in a future version.
If you rely on the current behaviour, change it to './/funcprototype/funcdef/function'
can be seen in CI output. So let's apply the suggestion.
This commit is contained in:
@@ -23,7 +23,7 @@ def find_undocumented_functions(pages, ignorelist):
|
|||||||
assert pagetree.getroot().tag == "refentry"
|
assert pagetree.getroot().tag == "refentry"
|
||||||
|
|
||||||
hist_section = pagetree.find("refsect1[title='History']")
|
hist_section = pagetree.find("refsect1[title='History']")
|
||||||
for func in pagetree.findall("//funcprototype/funcdef/function"):
|
for func in pagetree.findall(".//funcprototype/funcdef/function"):
|
||||||
path = f"./refsynopsisdiv/funcsynopsis/funcprototype/funcdef/function[.='{func.text}']"
|
path = f"./refsynopsisdiv/funcsynopsis/funcprototype/funcdef/function[.='{func.text}']"
|
||||||
assert pagetree.findall(path) == [func]
|
assert pagetree.findall(path) == [func]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user