Skip to content

Commit 903bef5

Browse files
ci: ignore #\r in Fuzz (#4766)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 2f7e323 commit 903bef5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/fuzz.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
def test_idempotent_any_syntatically_valid_python(
3939
src_contents: str, mode: black.FileMode
4040
) -> None:
41+
if (
42+
"#\r" in src_contents or "\\\n" in src_contents
43+
) and black.Preview.normalize_cr_newlines not in mode:
44+
return
45+
4146
# Before starting, let's confirm that the input string is valid Python:
4247
compile(src_contents, "<string>", "exec") # else the bug is in hypothesmith
4348

0 commit comments

Comments
 (0)