diff --git a/src/codemodder/codeql.py b/src/codemodder/codeql.py index a53323aa5..851063d88 100644 --- a/src/codemodder/codeql.py +++ b/src/codemodder/codeql.py @@ -45,7 +45,7 @@ def from_sarif( ) -> Self: rule_id = cls.extract_rule_id(sarif_result, sarif_run, truncate_rule_id) text_for_rule = get_text_for_rule(rule_id, sarif_run) - finding_msg = f"""{sarif_result['message']['text']}\n{text_for_rule}""" + finding_msg = f"{sarif_result['message']['text']}\n{text_for_rule}" return cls( rule_id=rule_id, locations=cls.extract_locations(sarif_result), @@ -87,5 +87,5 @@ def get_text_for_rule(rule_id: str, sarif_run: dict) -> str: for ext in sarif_run["tool"]["extensions"]: for rule in ext.get("rules", []): if rule["id"] == rule_id: - return f"{rule["fullDescription"]["text"]}\n{rule["help"]["text"]}" + return f"{rule['fullDescription']['text']}\n{rule['help']['text']}" return ""