mirror of
https://github.com/systemd/systemd
synced 2024-10-14 20:17:52 +00:00
update-dbus-docs: don't consider mentions in the History
Being mentioned in the History section as added in a specific version isn't enough to consider a member documented.
This commit is contained in:
parent
d9d2d16aea
commit
d0c0c1069b
|
@ -141,9 +141,15 @@ def print_interface(iface, *, prefix, file, print_boring, only_interface, declar
|
||||||
print(f'''{prefix}}};''', file=file)
|
print(f'''{prefix}}};''', file=file)
|
||||||
|
|
||||||
def document_has_elem_with_text(document, elem, item_repr):
|
def document_has_elem_with_text(document, elem, item_repr):
|
||||||
predicate = f".//{elem}" # [text() = 'foo'] doesn't seem supported :(
|
predicate = f".//{elem}[. = '{item_repr}']"
|
||||||
|
|
||||||
|
# Ignore mentions in the History section
|
||||||
|
history = document.find(".//refsect1[title = 'History']")
|
||||||
|
history_mentions = history.findall(predicate) if history else []
|
||||||
|
|
||||||
for loc in document.findall(predicate):
|
for loc in document.findall(predicate):
|
||||||
if loc.text == item_repr:
|
if loc in history_mentions:
|
||||||
|
continue
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue