Skip to content

Commit

Permalink
Ruff: Add and fix PLW0127
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik committed Jan 30, 2025
1 parent 420bf66 commit 7b40e54
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion dojo/tools/dsop/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ def __parse_anchore_compliance(self, test, items, sheet):
severity = "Critical"
else:
severity = "Info"
severity = severity
mitigation = "To be investigated"
description = "Gate: {} (Trigger: {}): {}".format(
row[headers["gate"]],
Expand Down
2 changes: 1 addition & 1 deletion dojo/tools/govulncheck/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_finding_trace_info(self, data, osv_id):
version = trace.get("version", "Unknown version")
package = trace.get("module", "Unknown package")
function = trace.get("function", "Unknown function")
filename = filename = trace.get("position", {}).get("filename", "Unknown filename")
filename = trace.get("position", {}).get("filename", "Unknown filename")
line = trace.get("position", {}).get("line", "Unknown line")
trace_info_str = f"\tModule: {module}, Version: {version}, Package: {package}, Function: {function}, File: {filename}, Line: {line}"
trace_info_strs.append(trace_info_str)
Expand Down
2 changes: 0 additions & 2 deletions dojo/tools/mend/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ def _build_common_output(node, lib_name=None):
locations = truncated_locations
locations.append("...") # Add the ellipsis to the end of the locations list

filepaths = filepaths

new_finding = Finding(
title=title,
test=test,
Expand Down
1 change: 0 additions & 1 deletion dojo/tools/npm_audit_7_plus/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def get_item(item_node, tree, test):
"""Return the individual Findigns from items found in report."""
references = []
mitigation = ""
test = test
static_finding = True
title = ""
unique_id_from_tool = ""
Expand Down
2 changes: 1 addition & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ select = [
"PLC01", "PLC0205", "PLC0208", "PLC0414", "PLC24", "PLC3",
"PLE",
"PLR01", "PLR0203", "PLR0206", "PLR0915", "PLR1716", "PLR172", "PLR1733", "PLR1736",
"PLW0120", "PLW0129", "PLW013", "PLW017", "PLW02", "PLW04", "PLW07", "PLW1", "PLW2", "PLW3",
"PLW0120", "PLW0127", "PLW0129", "PLW013", "PLW017", "PLW02", "PLW04", "PLW07", "PLW1", "PLW2", "PLW3",
"TRY003", "TRY004", "TRY2",
"FLY",
"NPY",
Expand Down

0 comments on commit 7b40e54

Please sign in to comment.