diff options
Diffstat (limited to 'doc/tools/doc_status.py')
-rwxr-xr-x | doc/tools/doc_status.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py index 717a468b36..57c03bfdee 100755 --- a/doc/tools/doc_status.py +++ b/doc/tools/doc_status.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 import fnmatch -import os -import sys -import re import math +import os import platform +import re +import sys import xml.etree.ElementTree as ET from typing import Dict, List, Set @@ -279,13 +279,18 @@ class ClassStatus: elif tag.tag in ["methods", "signals", "operators", "constructors"]: for sub_tag in list(tag): + is_deprecated = "deprecated" in sub_tag.attrib + is_experimental = "experimental" in sub_tag.attrib descr = sub_tag.find("description") - increment = (descr is not None) and (descr.text is not None) and len(descr.text.strip()) > 0 - status.progresses[tag.tag].increment(increment) + has_descr = (descr is not None) and (descr.text is not None) and len(descr.text.strip()) > 0 + status.progresses[tag.tag].increment(is_deprecated or is_experimental or has_descr) elif tag.tag in ["constants", "members", "theme_items"]: for sub_tag in list(tag): - if not sub_tag.text is None: - status.progresses[tag.tag].increment(len(sub_tag.text.strip()) > 0) + if sub_tag.text is not None: + is_deprecated = "deprecated" in sub_tag.attrib + is_experimental = "experimental" in sub_tag.attrib + has_descr = len(sub_tag.text.strip()) > 0 + status.progresses[tag.tag].increment(is_deprecated or is_experimental or has_descr) elif tag.tag in ["tutorials"]: pass # Ignore those tags for now |