This commit is contained in:
Robin Dunn
2018-06-24 20:40:58 -07:00
parent 36fa818f2f
commit 7394f1458b

View File

@@ -1979,13 +1979,13 @@ class XMLDocString(object):
else:
raise Exception('Unhandled docstring kind for %s'%xml_item.__class__.__name__)
# Some of the Exctractors (xml item) will set deprecated themselves, in which case it is set as a
# Some of the Extractors (xml item) will set deprecated themselves, in which case it is set as a
# non-empty string. In such cases, this branch will insert a deprecated section into the xml tree
# so that the Node Tree (see classes above) will generate the deprecated tag on their own in self.RecurseXML
if hasattr(xml_item, 'deprecated') and xml_item.deprecated and isinstance(xml_item.deprecated, string_base):
element = et.Element('deprecated', kind='deprecated')
element.text = xml_item.deprecated
deprecated_section = Section(element, None, self.kind, self.is_overload, self.share_docstrings)
self.root.AddSection(deprecated_section)