if want_all:
return False, ((m.find('name').text, m) for m in all_members)
- else:
- if not self.options.members:
- return False, []
- else:
- return False, ((m.find('name').text, m) for m in all_members
- if m.find('name').text in self.options.members)
+ if not self.options.members:
+ return False, []
+ return False, ((m.find('name').text, m) for m in all_members if m.find('name').text in self.options.members)
def filter_members(self, members, want_all):
ret = []
def parse_id(self, id):
xp = './/*[@id="%s"]' % id
match = get_doxygen_root().xpath(xp)
- if len(match) > 0:
+ if match:
match = match[0]
self.fullname = match.find('./definition').text.split()[-1]
self.modname = self.fullname
else:
xpath_query = xpath_query_noparam
match = get_doxygen_root().xpath(xpath_query)
- if len(match) == 0:
+ if not match:
logger = logging.getLogger(__name__)
if self.argsstring != None:
def format_template_name(self):
types = [e.text for e in self.object.findall('templateparamlist/param/type')]
- if len(types) == 0:
+ if not types:
return ''
ret = 'template <%s>' % ','.join(types)
# print ("template: {}".format(ret))
'/memberdef[@kind="variable"]/name[text()="{:s}"]/..').format(obj, var)
# print("fullname {}".format(self.fullname))
match = get_doxygen_root().xpath(xpath_query)
- if len(match) == 0:
+ if not match:
logger = logging.getLogger(__name__)
logger.warning("[autodoxy] WARNING: could not find variable {}::{} in Doxygen files".format(obj, var))
def parse_id(self, id):
xp = './/*[@id="%s"]' % id
match = get_doxygen_root().xpath(xp)
- if len(match) > 0:
+ if match:
match = match[0]
self.fullname = match.find('./definition').text.split()[-1]
self.modname = self.fullname
def format_template_name(self):
types = [e.text for e in self.object.findall('templateparamlist/param/type')]
- if len(types) == 0:
+ if not types:
return ''
ret = 'template <%s>' % ','.join(types)
# print ("template: {}".format(ret))
files = [os.path.join(app.config.doxygen_xml, f)
for f in os.listdir(app.config.doxygen_xml)
if f.lower().endswith('.xml') and not f.startswith('._')]
- if len(files) == 0:
+ if not files:
raise err
setup.DOXYGEN_ROOT = ET.ElementTree(ET.Element('root')).getroot()