We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24a06b7 commit 6223670Copy full SHA for 6223670
1 file changed
cyclonedx/contrib/bom/utils.py
@@ -56,13 +56,13 @@ def flatten_merge(self) -> None:
56
57
@staticmethod
58
def _merge_deps(deps: Iterable[Dependency]) -> Iterable[Dependency]:
59
- merged: dict[BomRef, Dependency] = {}
+ uniques: dict[BomRef, Dependency] = {}
60
for dep in deps:
61
- if m := merged.get(dep.ref):
62
- m.dependencies.update(dep.dependencies)
+ if (unique := uniques.get(dep.ref)) is not None:
+ unique.dependencies.update(dep.dependencies)
63
else:
64
- merged[dep.ref] = Dependency(dep.ref, dep.dependencies)
65
- return merged.values()
+ uniques[dep.ref] = Dependency(dep.ref, dep.dependencies)
+ return uniques.values()
66
67
68
def _flatten_dep(dep: Dependency) -> Iterable[Dependency]:
0 commit comments