File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 1313limitations under the License.
1414"""
1515
16- import itertools
1716from functools import total_ordering
1817from typing import Iterator , Iterable , Optional
1918
@@ -76,17 +75,14 @@ def get_children(self) -> Iterator["DiffElement"]:
7675 """
7776 order_default = "order_children_default"
7877
79- children : Iterator ["DiffElement" ] = itertools .chain ()
8078 for group in self .groups ():
8179 order_method_name = f"order_children_{ group } "
8280 if hasattr (self , order_method_name ):
8381 order_method = getattr (self , order_method_name )
8482 else :
8583 order_method = getattr (self , order_default )
8684
87- children = itertools .chain (children , order_method (self .children [group ]))
88-
89- return children
85+ yield from order_method (self .children [group ])
9086
9187 @classmethod
9288 def order_children_default (cls , children : dict ) -> Iterator ["DiffElement" ]:
Original file line number Diff line number Diff line change 99
1010
1111class MyDiff (Diff ):
12- """Custom Diff class to control the order of the site objects"""
12+ """Custom Diff class to control the order of the site objects. """
1313
1414 @classmethod
1515 def order_children_site (cls , children ):
You can’t perform that action at this time.
0 commit comments