From b0d55a821586c314e97b44de085630859bf541f6 Mon Sep 17 00:00:00 2001 From: Manuel Sommer Date: Mon, 1 Dec 2025 16:04:30 +0100 Subject: [PATCH 1/6] :arrow_up: Bump ruff from 0.14.6 to 0.14.7 --- requirements-lint.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-lint.txt b/requirements-lint.txt index c7e2cafe88d..5e1b1ec4b7f 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1 +1 @@ -ruff==0.14.6 \ No newline at end of file +ruff==0.14.7 \ No newline at end of file From f776fffdb2499d89d4f74295ab0f664688a66376 Mon Sep 17 00:00:00 2001 From: Manuel Sommer Date: Mon, 1 Dec 2025 16:08:38 +0100 Subject: [PATCH 2/6] ruff fixes --- dojo/importers/base_importer.py | 2 +- dojo/labels.py | 2 +- dojo/tools/scout_suite/parser.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dojo/importers/base_importer.py b/dojo/importers/base_importer.py index 212c976dc33..2a9ea69f1f7 100644 --- a/dojo/importers/base_importer.py +++ b/dojo/importers/base_importer.py @@ -390,7 +390,7 @@ def update_import_history( # In longer running imports it can happen that the async_dupe_delete task removes a finding before the history record is created # We filter out these findings here to avoid FK violations (IntegrityError) all_findings = [] - for _list, _ in finding_action_mappings: + for _list, _ in finding_action_mappings: # noqa: RUF052 all_findings.extend(_list) existing_findings = finding_helper.filter_findings_by_existence(all_findings) if all_findings else [] existing_ids = {f.id for f in existing_findings} diff --git a/dojo/labels.py b/dojo/labels.py index ce5ea520c5d..6306f1594ec 100644 --- a/dojo/labels.py +++ b/dojo/labels.py @@ -63,7 +63,7 @@ def __init__(self, label_set: dict[str, str]): As a side benefit, this will explode if any label defined on this class is not present in the given dict: a runtime check that a labels dict must be complete. """ - for _l, _v in self._get_label_entries().items(): + for _l, _v in self._get_label_entries().items(): # noqa: RUF052 try: setattr(self, _l, label_set[_v]) except KeyError: diff --git a/dojo/tools/scout_suite/parser.py b/dojo/tools/scout_suite/parser.py index 36a63888ea9..f3671466f34 100644 --- a/dojo/tools/scout_suite/parser.py +++ b/dojo/tools/scout_suite/parser.py @@ -157,10 +157,10 @@ def recursive_print(self, src, depth=0, key=""): def tabs(n): return " " * n * 2 if isinstance(src, dict): - for _key, value in src.items(): + for dictkey, value in src.items(): if isinstance(src, str): - self.item_data = self.item_data + _key + "\n" - self.recursive_print(value, depth + 1, _key) + self.item_data = self.item_data + dictkey + "\n" + self.recursive_print(value, depth + 1, dictkey) elif isinstance(src, list): for litem in src: self.recursive_print(litem, depth + 2) From 79f8fe8cd676f255cc62d9ed84f95cf6dd7453d1 Mon Sep 17 00:00:00 2001 From: manuelsommer <47991713+manuel-sommer@users.noreply.github.com> Date: Wed, 3 Dec 2025 08:31:25 +0100 Subject: [PATCH 3/6] Update dojo/importers/base_importer.py Co-authored-by: kiblik <5609770+kiblik@users.noreply.github.com> --- dojo/importers/base_importer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dojo/importers/base_importer.py b/dojo/importers/base_importer.py index 2a9ea69f1f7..7da3a0a360a 100644 --- a/dojo/importers/base_importer.py +++ b/dojo/importers/base_importer.py @@ -390,8 +390,8 @@ def update_import_history( # In longer running imports it can happen that the async_dupe_delete task removes a finding before the history record is created # We filter out these findings here to avoid FK violations (IntegrityError) all_findings = [] - for _list, _ in finding_action_mappings: # noqa: RUF052 - all_findings.extend(_list) + for list_, _ in finding_action_mappings: +all_findings.extend(list_) existing_findings = finding_helper.filter_findings_by_existence(all_findings) if all_findings else [] existing_ids = {f.id for f in existing_findings} From e3a37a5f1f5296c68f7116c527fb08885bab88d8 Mon Sep 17 00:00:00 2001 From: manuelsommer <47991713+manuel-sommer@users.noreply.github.com> Date: Wed, 3 Dec 2025 08:36:05 +0100 Subject: [PATCH 4/6] Fix indentation in base_importer.py --- dojo/importers/base_importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dojo/importers/base_importer.py b/dojo/importers/base_importer.py index 7da3a0a360a..096161db3fa 100644 --- a/dojo/importers/base_importer.py +++ b/dojo/importers/base_importer.py @@ -391,7 +391,7 @@ def update_import_history( # We filter out these findings here to avoid FK violations (IntegrityError) all_findings = [] for list_, _ in finding_action_mappings: -all_findings.extend(list_) + all_findings.extend(list_) existing_findings = finding_helper.filter_findings_by_existence(all_findings) if all_findings else [] existing_ids = {f.id for f in existing_findings} From f37101dc41f6d8f3a871cb77ac0ab04f13b9aaa0 Mon Sep 17 00:00:00 2001 From: manuelsommer <47991713+manuel-sommer@users.noreply.github.com> Date: Wed, 3 Dec 2025 08:37:26 +0100 Subject: [PATCH 5/6] Update labels.py --- dojo/labels.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dojo/labels.py b/dojo/labels.py index 6306f1594ec..504c8e55fe1 100644 --- a/dojo/labels.py +++ b/dojo/labels.py @@ -63,11 +63,11 @@ def __init__(self, label_set: dict[str, str]): As a side benefit, this will explode if any label defined on this class is not present in the given dict: a runtime check that a labels dict must be complete. """ - for _l, _v in self._get_label_entries().items(): # noqa: RUF052 + for l_, v_ in self._get_label_entries().items(): try: - setattr(self, _l, label_set[_v]) + setattr(self, l_, label_set[v_]) except KeyError: - error_message = f"Supplied copy dictionary does not provide entry for {_l}" + error_message = f"Supplied copy dictionary does not provide entry for {l_}" logger.error(error_message) raise ValueError(error_message) From 79c9dc9c8ab5e5da2b5ec60f42228a1504abde74 Mon Sep 17 00:00:00 2001 From: Manuel Sommer Date: Fri, 5 Dec 2025 09:12:11 +0100 Subject: [PATCH 6/6] bump --- requirements-lint.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-lint.txt b/requirements-lint.txt index 5e1b1ec4b7f..c159d0ea01b 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1 +1 @@ -ruff==0.14.7 \ No newline at end of file +ruff==0.14.8 \ No newline at end of file