Skip to content

Commit 5eb5669

Browse files
committed
removed unnecessary condition - self.get_bom().components is always a Set
Signed-off-by: Paul Horton <[email protected]>
1 parent b8d526e commit 5eb5669

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

cyclonedx/output/json.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,11 @@ def generate(self, force_regeneration: bool = False) -> None:
7171
'ref': str(cast(Component, self.get_bom().metadata.component).bom_ref),
7272
'dependsOn': [*map(str, cast(Component, self.get_bom().metadata.component).dependencies)]
7373
})
74-
if self.get_bom().components:
75-
for component in self.get_bom().components:
76-
dependencies.append({
77-
'ref': str(component.bom_ref),
78-
'dependsOn': [*map(str, component.dependencies)]
79-
})
74+
for component in self.get_bom().components:
75+
dependencies.append({
76+
'ref': str(component.bom_ref),
77+
'dependsOn': [*map(str, component.dependencies)]
78+
})
8079
if dependencies:
8180
extras["dependencies"] = dependencies
8281

0 commit comments

Comments
 (0)