Skip to content

Commit ec2ca28

Browse files
authored
Upgrade dependencies to latest versions (#1557)
* Upgrade dependencies to latest versions Signed-off-by: tdruez <tdruez@nexb.com> * Run Ruff linter validation Signed-off-by: tdruez <tdruez@nexb.com> --------- Signed-off-by: tdruez <tdruez@nexb.com>
1 parent ecdb701 commit ec2ca28

File tree

14 files changed

+23
-32
lines changed

14 files changed

+23
-32
lines changed

scanpipe/management/commands/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def execute_project(project, run_async=False, command=None): # noqa: C901
427427
msg = f"Error during {run.pipeline_name} execution:\n{run.task_output}"
428428
raise CommandError(msg)
429429
elif verbosity > 0:
430-
msg = f"{run.pipeline_name} successfully executed on " f"project {project}"
430+
msg = f"{run.pipeline_name} successfully executed on project {project}"
431431
command.stdout.write(msg, command.style.SUCCESS)
432432

433433

scanpipe/management/commands/check-compliance.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ def handle(self, *args, **options):
6161

6262
if self.verbosity > 0:
6363
msg = [
64-
f"{compliance_alerts_count} compliance issues detected on "
65-
f"this project."
64+
f"{compliance_alerts_count} compliance issues detected on this project."
6665
]
6766
for label, issues in compliance_alerts.items():
6867
msg.append(f"[{label}]")

scanpipe/management/commands/output.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ def handle_output(self, output_format):
7373
output_format, version = output_format.split(":", maxsplit=1)
7474
if output_format != "cyclonedx":
7575
raise CommandError(
76-
'The ":" version syntax is only supported for the cyclonedx '
77-
"format."
76+
'The ":" version syntax is only supported for the cyclonedx format.'
7877
)
7978
output_kwargs["version"] = version
8079

scanpipe/pipelines/publish_to_federatedcode.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ def commit_and_push_changes(self):
8888
logger=self.log,
8989
)
9090
self.log(
91-
f"Scan result for '{self.project.purl}' "
92-
f"pushed to '{self.package_git_repo}'"
91+
f"Scan result for '{self.project.purl}' pushed to '{self.package_git_repo}'"
9392
)
9493

9594
def delete_local_clone(self):

scanpipe/pipes/d2d.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,9 +1721,7 @@ def map_paths_resource(
17211721
f"{', '.join(map_types)} for: {to_resource.path!r}"
17221722
)
17231723
else:
1724-
logger(
1725-
f"No mappings using {', '.join(map_types)} for: " f"{to_resource.path!r}"
1726-
)
1724+
logger(f"No mappings using {', '.join(map_types)} for: {to_resource.path!r}")
17271725

17281726

17291727
def process_paths_in_binary(

scanpipe/pipes/federatedcode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def get_package_repository(project_purl, logger=None):
7373
"""Return the Git repository URL and scan path for a given package."""
7474
project_package_url = PackageURL.from_string(project_purl)
7575

76-
git_account_url = f'{settings.FEDERATEDCODE_GIT_ACCOUNT_URL.rstrip("/")}/'
76+
git_account_url = f"{settings.FEDERATEDCODE_GIT_ACCOUNT_URL.rstrip('/')}/"
7777
package_base_dir = hashid.get_package_base_dir(purl=project_purl)
7878
package_repo_name = package_base_dir.parts[0]
7979

scanpipe/pipes/matchcode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class MatchCodeIOException(Exception):
5050
MATCHCODEIO_API_URL = None
5151
MATCHCODEIO_URL = settings.MATCHCODEIO_URL
5252
if MATCHCODEIO_URL:
53-
MATCHCODEIO_API_URL = f'{MATCHCODEIO_URL.rstrip("/")}/api/'
53+
MATCHCODEIO_API_URL = f"{MATCHCODEIO_URL.rstrip('/')}/api/"
5454

5555
# Basic Authentication
5656
MATCHCODEIO_USER = settings.MATCHCODEIO_USER

scanpipe/pipes/purldb.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class PurlDBException(Exception):
5050
PURLDB_API_URL = None
5151
PURLDB_URL = settings.PURLDB_URL
5252
if PURLDB_URL:
53-
PURLDB_API_URL = f'{PURLDB_URL.rstrip("/")}/api/'
53+
PURLDB_API_URL = f"{PURLDB_URL.rstrip('/')}/api/"
5454

5555
# Basic Authentication
5656
PURLDB_USER = settings.PURLDB_USER
@@ -368,9 +368,7 @@ def populate_purldb_with_discovered_dependencies(project, logger=logger.info):
368368
"""Add DiscoveredDependency to PurlDB."""
369369
packages = [{"purl": purl} for purl in get_unique_resolved_purls(project)]
370370

371-
logger(
372-
f"Populating PurlDB with {len(packages):,d} " "PURLs from DiscoveredDependency"
373-
)
371+
logger(f"Populating PurlDB with {len(packages):,d} PURLs from DiscoveredDependency")
374372
feed_purldb(
375373
packages=packages,
376374
chunk_size=100,

scanpipe/pipes/symbolmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def map_resources_with_symbols(
9090
)
9191

9292
elif logger:
93-
logger(f"No mappings using {map_type} for: " f"{to_resource.path!r}")
93+
logger(f"No mappings using {map_type} for: {to_resource.path!r}")
9494

9595

9696
def match_source_symbols_to_binary(source_symbols, binary_symbols):

scanpipe/pipes/vulnerablecode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
VULNERABLECODE_API_URL = None
3636
VULNERABLECODE_URL = settings.VULNERABLECODE_URL
3737
if VULNERABLECODE_URL:
38-
VULNERABLECODE_API_URL = f'{VULNERABLECODE_URL.rstrip("/")}/api/'
38+
VULNERABLECODE_API_URL = f"{VULNERABLECODE_URL.rstrip('/')}/api/"
3939

4040
# Basic Authentication
4141
VULNERABLECODE_USER = settings.VULNERABLECODE_USER

0 commit comments

Comments
 (0)