Skip to content

Commit f0e3b65

Browse files
authored
Add 'annotation' to child type checks in parser
1 parent eb778c1 commit f0e3b65

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

masci_tools/io/parsers/fleur_schema/fleur_schema_parser_functions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ def _is_simple(elem: etree._Element) -> bool:
634634
for child in elem:
635635
child_type = _normalized_name(child.tag)
636636

637-
if child_type in ['attribute', 'simpleContent']:
637+
if child_type in ['attribute', 'simpleContent','annotation']:
638638
continue
639639
if child_type in ['element', 'sequence', 'choice', 'all']:
640640
simple = False
@@ -842,7 +842,7 @@ def _get_sequence_order(xmlschema_evaluator: etree.XPathDocumentEvaluator, seque
842842
new_order = _get_sequence_order(xmlschema_evaluator, group[0])
843843
for elem in new_order:
844844
elem_order.append(elem)
845-
elif child_type in ['attribute', 'simpleContent', 'all']:
845+
elif child_type in ['attribute', 'simpleContent', 'all','annotation']:
846846
continue
847847
else:
848848
raise KeyError(f'Dont know what to do with {child_type}')
@@ -874,7 +874,7 @@ def _get_valid_tags(xmlschema_evaluator: etree.XPathDocumentEvaluator, sequence_
874874
new_elems = _get_valid_tags(xmlschema_evaluator, group[0])
875875
for elem in new_elems:
876876
elems.append(elem)
877-
elif child_type in ['attribute', 'simpleContent']:
877+
elif child_type in ['attribute', 'simpleContent','annotation']:
878878
continue
879879
else:
880880
raise KeyError(f'Dont know what to do with {child_type}')

0 commit comments

Comments
 (0)