Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_children(self, child_groups):
"""Method to create child groups objects
by iterating over all children.
"""
for g in child_groups:
self.children.append(
_group_class(
element=g,
top=False,
path=self.path,
pathchar=self.pathchar,
vars=self.vars,
)
)
# get regexes from tail
if g.tail.strip():
self.get_regexes(data=g.tail, tail=True)
def parse_group(element, grp_index):
self.groups.append(
_group_class(
element,
top=True,
pathchar=self.PATHCHAR,
vars=self.vars,
grp_index=grp_index,
)