Closed
Description
Bug report
Bug description:
#122063 causes Black to fail non-deterministically.
To reproduce:
printf 'import argparse
import string
S1 = f"{argparse.OPTIONAL[:9]=}"
S2 = (string.ascii_uppercase + string.ascii_lowercase)
' > test.py
python3.12 -m pip install --no-cache-dir --upgrade black --target tmpenv
for i in $(seq 1 10); do PYTHONPATH=tmpenv ./python.exe -m black --check --diff test.py; done
You now non-deterministically get:
error: cannot format test.py: INTERNAL ERROR: Black produced code that is not equivalent to the source. Please report a bug on https://github.com/psf/black/issues. This diff might be helpful: /var/folders/0y/.../T/....log
Note I think you need a non-debug build and probably a Mac
cc @pablogsal
CPython versions tested on:
3.12
Metadata
Metadata
Assignees
Projects
Status
Done