Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and nightlark committed Oct 7, 2024
1 parent c5aed0d commit 7439af4
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions surfactant/cmd/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"--config_file",
type=click.File("r"),
required=False,
help="Config file for controlling some aspects of the merged SBOM, primarily the creation of a new top-level system object (settings here will typically take precedence over command line options)"
help="Config file for controlling some aspects of the merged SBOM, primarily the creation of a new top-level system object (settings here will typically take precedence over command line options)",
)
@click.option(
"--output_format",
Expand Down Expand Up @@ -45,7 +45,15 @@
help="Create a top-level system entry for tying together the merged SBOM components. When disabled, relationships will still be created to a provided system UUID",
)
@click.command("merge")
def merge_command(input_sboms, sbom_outfile, config_file, output_format, input_format, system_relationship, add_system):
def merge_command(
input_sboms,
sbom_outfile,
config_file,
output_format,
input_format,
system_relationship,
add_system,
):
"""Merge two or more INPUT_SBOMS together into SBOM_OUTFILE.
An optional CONFIG_FILE can be supplied to specify a root system entry
Expand All @@ -63,7 +71,14 @@ def merge_command(input_sboms, sbom_outfile, config_file, output_format, input_f
merge(sboms, sbom_outfile, config, output_writer, system_relationship, add_system)


def merge(input_sboms, sbom_outfile, config, output_writer, system_relationship="Contains", add_system=True):
def merge(
input_sboms,
sbom_outfile,
config,
output_writer,
system_relationship="Contains",
add_system=True,
):
"""Merge two or more SBOMs."""
merged_sbom = input_sboms[0]
for sbom_m in input_sboms[1:]:
Expand Down

0 comments on commit 7439af4

Please sign in to comment.