Spec: Remove unused methods on _EdgeMap
`_EdgeMap` implements `_cmp_iter` for `lazy_lexicographic_ordering` but it's never used or tested. Remove it. Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
This commit is contained in:
parent
2929ea02a1
commit
a5f1a4ea81
@ -961,7 +961,6 @@ def _sort_by_dep_types(dspec: DependencySpec):
|
|||||||
return dspec.depflag
|
return dspec.depflag
|
||||||
|
|
||||||
|
|
||||||
@lang.lazy_lexicographic_ordering
|
|
||||||
class _EdgeMap(collections.abc.Mapping):
|
class _EdgeMap(collections.abc.Mapping):
|
||||||
"""Represent a collection of edges (DependencySpec objects) in the DAG.
|
"""Represent a collection of edges (DependencySpec objects) in the DAG.
|
||||||
|
|
||||||
@ -999,21 +998,6 @@ def add(self, edge: DependencySpec) -> None:
|
|||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return f"{{deps: {', '.join(str(d) for d in sorted(self.values()))}}}"
|
return f"{{deps: {', '.join(str(d) for d in sorted(self.values()))}}}"
|
||||||
|
|
||||||
def _cmp_iter(self):
|
|
||||||
for item in sorted(itertools.chain.from_iterable(self.edges.values())):
|
|
||||||
yield item
|
|
||||||
|
|
||||||
def copy(self):
|
|
||||||
"""Copies this object and returns a clone"""
|
|
||||||
clone = type(self)()
|
|
||||||
clone.store_by_child = self.store_by_child
|
|
||||||
|
|
||||||
# Copy everything from this dict into it.
|
|
||||||
for dspec in itertools.chain.from_iterable(self.values()):
|
|
||||||
clone.add(dspec.copy())
|
|
||||||
|
|
||||||
return clone
|
|
||||||
|
|
||||||
def select(
|
def select(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
|
Loading…
Reference in New Issue
Block a user