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.
This commit is contained in:
Brent Westbrook 2025-04-04 15:13:59 -04:00 committed by GitHub
parent 95d6ed40cc
commit b3243b5e2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,6 +71,7 @@ def ruff_contains_bug(code: str, *, ruff_executable: Path) -> bool:
"--no-cache",
"--target-version",
"py313",
"--preview",
"-",
],
capture_output=True,