[cleanup] Drop unreachable code
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 29 Mar 2017 08:55:24 +0200
changeset 2550 a30217def173
parent 2549 25a08a735334
child 2551 ac722d56776b
[cleanup] Drop unreachable code We never run into this part of the code, so let's drop it.
cubicweb_seda/xsd.py
--- a/cubicweb_seda/xsd.py	Wed Mar 29 08:54:39 2017 +0200
+++ b/cubicweb_seda/xsd.py	Wed Mar 29 08:55:24 2017 +0200
@@ -297,12 +297,6 @@
         if len(element.children) == 1:
             assert parent_occ.minimum == parent_occ.maximum == 1
             _jump(self._stack[-2], parent_occ, element.children[0])
-        # skip sequence with maxOccurs = 1 and either minOccurs = 1 or all children have
-        # minOccurs = 0
-        elif parent_occ.maximum == 1 and (parent_occ.minimum == 1
-                                          or all(cocc.minimum == 0 for cocc in element.children)):
-            if not isinstance(self._stack[-2], (graph_nodes.XMLElement, graph_nodes.Alternative)):
-                _replace(self._stack[-2], parent_occ, element.children)
 
     leave_sequence = leave_group