@@ -175,7 +175,11 @@ def test_format_code_ruff_check_formatter(tmp_path: Path, monkeypatch: pytest.Mo
175175
176176 assert formatted_code == "output"
177177 mock_run .assert_called_once_with (
178- ("ruff" , "check" , "--fix" , "-" ), input = b"input" , capture_output = True , check = False , cwd = str (tmp_path )
178+ ("ruff" , "check" , "--fix" , "--unsafe-fixes" , "-" ),
179+ input = b"input" ,
180+ capture_output = True ,
181+ check = False ,
182+ cwd = str (tmp_path ),
179183 )
180184
181185
@@ -227,7 +231,7 @@ def test_format_directory_ruff_check(tmp_path: Path, monkeypatch: pytest.MonkeyP
227231 formatter .format_directory (output_dir )
228232
229233 mock_run .assert_called_once_with (
230- ("ruff" , "check" , "--fix" , str (output_dir )),
234+ ("ruff" , "check" , "--fix" , "--unsafe-fixes" , str (output_dir )),
231235 capture_output = True ,
232236 check = False ,
233237 cwd = str (tmp_path ),
@@ -270,7 +274,7 @@ def test_format_directory_both_ruff_formatters(tmp_path: Path, monkeypatch: pyte
270274
271275 assert mock_run .call_count == 2
272276 mock_run .assert_any_call (
273- ("ruff" , "check" , "--fix" , str (output_dir )),
277+ ("ruff" , "check" , "--fix" , "--unsafe-fixes" , str (output_dir )),
274278 capture_output = True ,
275279 check = False ,
276280 cwd = str (tmp_path ),
@@ -323,7 +327,7 @@ def test_generate_with_ruff_batch_formatting(tmp_path: Path) -> None:
323327
324328 assert mock_run .call_count == 2
325329 mock_run .assert_any_call (
326- ("ruff" , "check" , "--fix" , str (output_dir )),
330+ ("ruff" , "check" , "--fix" , "--unsafe-fixes" , str (output_dir )),
327331 capture_output = True ,
328332 check = False ,
329333 cwd = mock .ANY ,
0 commit comments