Skip to content

Commit

Permalink
Flake update
Browse files Browse the repository at this point in the history
Signed-off-by: Henri Rosten <[email protected]>
  • Loading branch information
henrirosten committed Jan 3, 2025
1 parent f611afc commit efc158b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
26 changes: 13 additions & 13 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/sbomnix/sbomdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# SPDX-License-Identifier: Apache-2.0

# pylint: disable=too-many-instance-attributes, too-many-arguments
# pylint: disable=too-many-locals, too-many-statements
# pylint: disable=too-many-locals, too-many-statements, too-many-positional-arguments

"""Module for generating SBOMs in various formats"""

Expand Down
9 changes: 4 additions & 5 deletions src/vulnxscan/vulnxscan_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,10 @@ def _generate_sbom(target_path, buildtime=False):
prefix = "vulnxscan_"
cdx_suffix = ".json"
csv_suffix = ".csv"
with NamedTemporaryFile(
delete=False, prefix=prefix, suffix=cdx_suffix
) as fcdx, NamedTemporaryFile(
delete=False, prefix=prefix, suffix=csv_suffix
) as fcsv:
with (
NamedTemporaryFile(delete=False, prefix=prefix, suffix=cdx_suffix) as fcdx,
NamedTemporaryFile(delete=False, prefix=prefix, suffix=csv_suffix) as fcsv,
):
sbomdb.to_cdx(fcdx.name, printinfo=False)
sbomdb.to_csv(fcsv.name, loglevel=logging.DEBUG)
return pathlib.Path(fcdx.name), pathlib.Path(fcsv.name)
Expand Down
7 changes: 4 additions & 3 deletions tests/test_sbomnix.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,10 @@ def __call__(self, uri):

def validate_json(file_path, schema_path):
"""Validate json file matches schema"""
with open(file_path, encoding="utf-8") as json_file, open(
schema_path, encoding="utf-8"
) as schema_file:
with (
open(file_path, encoding="utf-8") as json_file,
open(schema_path, encoding="utf-8") as schema_file,
):
json_obj = json.load(json_file)
schema_obj = json.load(schema_file)
reg = referencing.Registry(retrieve=JSONSchemaRetrieve())
Expand Down

0 comments on commit efc158b

Please sign in to comment.