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] committed Dec 17, 2024
1 parent a7ccf73 commit a361e09
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions surfactant/infoextractors/js_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def extract_file_info(sbom: SBOM, software: Software, filename: str, filetype: s

def extract_js_info(filename: str) -> object:
js_info: Dict[str, Any] = {"jsLibraries": []}
js_lib_file = ConfigManager().get_data_dir_path() / "infoextractors" / "js_library_patterns.json"
js_lib_file = (
ConfigManager().get_data_dir_path() / "infoextractors" / "js_library_patterns.json"
)

# Load expressions from retire.js, should move this file elsewhere
try:
Expand Down Expand Up @@ -141,7 +143,9 @@ def load_db():
retirejs = load_database()
if retirejs is not None:
cleaned = strip_irrelevant_data(retirejs)
json_file_path = ConfigManager().get_data_dir_path() / "infoextractors" / "js_library_patterns.json"
json_file_path = (
ConfigManager().get_data_dir_path() / "infoextractors" / "js_library_patterns.json"
)
with open(json_file_path, "w") as f:
json.dump(cleaned, f, indent=4)
logger.info("Javascript library CVE database loaded.")
Expand Down

0 comments on commit a361e09

Please sign in to comment.