Skip to content

Commit cb09a3e

Browse files
squash commit (#11988)
1 parent 6fdcf80 commit cb09a3e

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

dojo/tools/blackduck_component_risk/parser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,7 @@ def security_impact(self, vulns):
302302
"""
303303
max_impact = 0.0
304304
for vuln in vulns:
305-
if float(vuln["Impact"]) > max_impact:
306-
max_impact = float(vuln["Impact"])
305+
max_impact = max(max_impact, float(vuln["Impact"]))
307306
return max_impact
308307

309308
def security_references(self, vulns):

dojo/utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2625,10 +2625,8 @@ def get_open_findings_burndown(product):
26252625
info_count -= 1
26262626

26272627
f_day = [critical_count, high_count, medium_count, low_count, info_count]
2628-
if min(f_day) < running_min:
2629-
running_min = min(f_day)
2630-
if max(f_day) > running_max:
2631-
running_max = max(f_day)
2628+
running_min = min(running_min, *f_day)
2629+
running_max = max(running_max, *f_day)
26322630

26332631
past_90_days["Critical"].append([d_start * 1000, critical_count])
26342632
past_90_days["High"].append([d_start * 1000, high_count])

ruff.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ select = [
7676
"PGH",
7777
"PLC01", "PLC0205", "PLC0208", "PLC0414", "PLC18", "PLC24", "PLC28", "PLC3",
7878
"PLE",
79-
"PLR01", "PLR02", "PLR04", "PLR0915", "PLR1716", "PLR172", "PLR1733", "PLR1736", "PLR2044", "PLR5", "PLR6104", "PLR6201",
79+
"PLR01", "PLR02", "PLR04", "PLR0915", "PLR1716", "PLR172", "PLR173", "PLR2044", "PLR5", "PLR6104", "PLR6201",
8080
"PLW01", "PLW02", "PLW04", "PLW0604", "PLW07", "PLW1", "PLW2", "PLW3",
8181
"TRY003", "TRY004", "TRY2", "TRY300", "TRY401",
8282
"FLY",

tests/base_test_class.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,7 @@ def get_log(self, log_type):
477477

478478
# save the last timestamp only if newer
479479
# in this set of logs
480-
if entry["timestamp"] > last_timestamp:
481-
last_timestamp = entry["timestamp"]
480+
last_timestamp = max(last_timestamp, entry["timestamp"])
482481

483482
# store the very last timestamp
484483
self.last_timestamp = last_timestamp

0 commit comments

Comments
 (0)