From b3243b5e2aa6b7f15a41af4c61780ed13afa98ae Mon Sep 17 00:00:00 2001 From: Brent Westbrook <36778786+ntBre@users.noreply.github.com> Date: Fri, 4 Apr 2025 15:13:59 -0400 Subject: [PATCH] Run fuzzer with `--preview` (#17210) Summary -- Updates `fuzz.py` to run with `--preview`, which should allow it to catch semantic syntax errors. Test Plan -- @AlexWaygood and I temporarily made any named expression a semantic syntax error and checked that this led to fuzzing errors. We also tested that reverting the `--preview` addition did not show any errors. We also ran the fuzzer on 500 seeds on `main` but didn't find any issues, (un)fortunately. --- python/py-fuzzer/fuzz.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/py-fuzzer/fuzz.py b/python/py-fuzzer/fuzz.py index 5cbf2b145f..1028ca2d90 100644 --- a/python/py-fuzzer/fuzz.py +++ b/python/py-fuzzer/fuzz.py @@ -71,6 +71,7 @@ def ruff_contains_bug(code: str, *, ruff_executable: Path) -> bool: "--no-cache", "--target-version", "py313", + "--preview", "-", ], capture_output=True,