|
@@ -139,7 +139,7 @@ def _nodes_for_one_member(self, member):
|
|
term.append(nodes.literal('', member.type.doc_type()))
|
|
term.append(nodes.literal('', member.type.doc_type()))
|
|
if member.optional:
|
|
if member.optional:
|
|
term.append(nodes.Text(' (optional)'))
|
|
term.append(nodes.Text(' (optional)'))
|
|
- if member.ifcond.ifcond:
|
|
|
|
|
|
+ if member.ifcond.is_present():
|
|
term.extend(self._nodes_for_ifcond(member.ifcond))
|
|
term.extend(self._nodes_for_ifcond(member.ifcond))
|
|
return term
|
|
return term
|
|
|
|
|
|
@@ -154,7 +154,7 @@ def _nodes_for_variant_when(self, variants, variant):
|
|
nodes.literal('', variants.tag_member.name),
|
|
nodes.literal('', variants.tag_member.name),
|
|
nodes.Text(' is '),
|
|
nodes.Text(' is '),
|
|
nodes.literal('', '"%s"' % variant.name)]
|
|
nodes.literal('', '"%s"' % variant.name)]
|
|
- if variant.ifcond.ifcond:
|
|
|
|
|
|
+ if variant.ifcond.is_present():
|
|
term.extend(self._nodes_for_ifcond(variant.ifcond))
|
|
term.extend(self._nodes_for_ifcond(variant.ifcond))
|
|
return term
|
|
return term
|
|
|
|
|
|
@@ -209,7 +209,7 @@ def _nodes_for_enum_values(self, doc):
|
|
dlnode = nodes.definition_list()
|
|
dlnode = nodes.definition_list()
|
|
for section in doc.args.values():
|
|
for section in doc.args.values():
|
|
termtext = [nodes.literal('', section.member.name)]
|
|
termtext = [nodes.literal('', section.member.name)]
|
|
- if section.member.ifcond.ifcond:
|
|
|
|
|
|
+ if section.member.ifcond.is_present():
|
|
termtext.extend(self._nodes_for_ifcond(section.member.ifcond))
|
|
termtext.extend(self._nodes_for_ifcond(section.member.ifcond))
|
|
# TODO drop fallbacks when undocumented members are outlawed
|
|
# TODO drop fallbacks when undocumented members are outlawed
|
|
if section.text:
|
|
if section.text:
|
|
@@ -277,7 +277,7 @@ def _nodes_for_sections(self, doc):
|
|
def _nodes_for_if_section(self, ifcond):
|
|
def _nodes_for_if_section(self, ifcond):
|
|
"""Return list of doctree nodes for the "If" section"""
|
|
"""Return list of doctree nodes for the "If" section"""
|
|
nodelist = []
|
|
nodelist = []
|
|
- if ifcond.ifcond:
|
|
|
|
|
|
+ if ifcond.is_present():
|
|
snode = self._make_section('If')
|
|
snode = self._make_section('If')
|
|
snode += nodes.paragraph(
|
|
snode += nodes.paragraph(
|
|
'', '', *self._nodes_for_ifcond(ifcond, with_if=False)
|
|
'', '', *self._nodes_for_ifcond(ifcond, with_if=False)
|