1
1
"""A container for specifying and manipulating a graph with distinct inputs and outputs."""
2
2
3
3
import time
4
- from collections import OrderedDict , defaultdict
4
+ from collections import defaultdict
5
5
from collections .abc import Iterable , Sequence
6
6
from typing import TYPE_CHECKING , Any , Literal , Union , cast
7
7
@@ -768,12 +768,12 @@ def orderings(self) -> dict[Apply, list[Apply]]:
768
768
769
769
"""
770
770
assert isinstance (self ._features , list )
771
- all_orderings : list [OrderedDict ] = []
771
+ all_orderings : list [dict ] = []
772
772
773
773
for feature in self ._features :
774
774
if hasattr (feature , "orderings" ):
775
775
orderings = feature .orderings (self )
776
- if not isinstance (orderings , OrderedDict ):
776
+ if not isinstance (orderings , dict ):
777
777
raise TypeError (
778
778
"Non-deterministic return value from "
779
779
+ str (feature .orderings )
@@ -794,7 +794,7 @@ def orderings(self) -> dict[Apply, list[Apply]]:
794
794
return all_orderings [0 ].copy ()
795
795
else :
796
796
# If there is more than 1 ordering, combine them.
797
- ords : dict [Apply , list [Apply ]] = OrderedDict ()
797
+ ords : dict [Apply , list [Apply ]] = {}
798
798
for orderings in all_orderings :
799
799
for node , prereqs in orderings .items ():
800
800
ords .setdefault (node , []).extend (prereqs )
0 commit comments