You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ /path/to/my/venv/bin/python -m pyink -v pyink-test.py
Identified `/path/to/my/venv` as project root containing a .git directory.
Using configuration from project root.
target_version: ['py312']
Found input source: "pyink-test.py"
Traceback (most recent call last):
File "/path/to/my/venv/lib/python3.12/site-packages/pyink/__init__.py", line 950, in reformat_one
if changed is not Changed.CACHED and format_file_in_place(
^^^^^^^^^^^^^^^^^^^^^
File "/path/to/my/venv/lib/python3.12/site-packages/pyink/__init__.py", line 992, in format_file_in_place
dst_contents = format_file_contents(
^^^^^^^^^^^^^^^^^^^^^
File "/path/to/my/venv/lib/python3.12/site-packages/pyink/__init__.py", line 1124, in format_file_contents
check_stability_and_equivalence(
File "/path/to/my/venv/lib/python3.12/site-packages/pyink/__init__.py", line 1098, in check_stability_and_equivalence
assert_equivalent(src_contents, dst_contents)
File "/path/to/my/venv/lib/python3.12/site-packages/pyink/__init__.py", line 1592, in assert_equivalent
raise ASTSafetyError(
pyink.parsing.ASTSafetyError: 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: /tmp/blk_qpj__4sq.log
error: cannot format pyink-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: /tmp/blk_qpj__4sq.log
Oh no! 💥 💔 💥
1 file failed to reformat.
$ /path/to/my/venv/bin/python -m black -v pyink-test.py
Identified `/path/to/my/venv` as project root containing a .git directory.
Using configuration from project root.
target_version: ['py312', 'py313']
Found input source: "pyink-test.py"
pyink-test.py wasn't modified on disk since last run.
All done! ✨ 🍰 ✨
1 file left unchanged.
The text was updated successfully, but these errors were encountered:
Black released https://github.com/psf/black/releases/tag/24.4.2 last week addressing f-string parsing. Can you pull in these changes?
Given a simple test file (pyink-test.py):
Results in:
Upgrading Black in the same venv, however:
Black 24.4.2 works:
The text was updated successfully, but these errors were encountered: