Skip to content

Commit 60ca4a8

Browse files
committed
Fix Sonar warnings
1 parent 878e206 commit 60ca4a8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/test_codeql.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def test_from_duplicate_files(codeql_result_set: Path):
3636
class TestCodeQLResultSet(TestCase):
3737

3838
def test_from_sarif(self):
39-
sarif_file = Path("/path/to/sarif/file.sarif")
4039
with tempfile.TemporaryDirectory() as tempdir:
4140
sarif_file = Path(tempdir) / "file.sarif"
4241
sarif_file.write_text(json.dumps(SARIF_CONTENT))

tests/test_xml_transformer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ def test_change_only_line_matching_result(self):
163163
}
164164
)
165165
sarif_run = data.runs[0]
166-
sarif_results = sarif_run.results or []
166+
assert sarif_run.results
167+
sarif_results = sarif_run.results
167168
results = [SemgrepResult.from_sarif(sarif_results[0], sarif_run)]
168169
self.run_and_assert(name_attr_map, input_code, expected_output, results, True)
169170

0 commit comments

Comments
 (0)