Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Black produced invalid code: f-string: expecting '}' #4074

Closed
zachsa opened this issue Nov 28, 2023 · 1 comment
Closed

Black produced invalid code: f-string: expecting '}' #4074

zachsa opened this issue Nov 28, 2023 · 1 comment
Labels
T: bug Something isn't working

Comments

@zachsa
Copy link

zachsa commented Nov 28, 2023

$ black .
error: cannot format ..../init.py: INTERNAL ERROR: Black produced invalid code: f-string: expecting '}' (, line 35). Please report a bug on https://github.com/psf/black/issues. This invalid output might be helpful: /tmp/blk_pq9jt9me.log

Oh no! 💥 💔 💥
63 files left unchanged, 1 file failed to reformat.

The line is this:

f'SQL string to apply to input CSV (i.e. "select * from stdin"), or apply a built-in aggregation: {', '.join([f"\"{r}\"" for r in existing_reports])}'
@zachsa zachsa added the T: bug Something isn't working label Nov 28, 2023
@hauntsaninja
Copy link
Collaborator

Duplicate of #3746

(That is not valid Python syntax for Python 3.11 and lower)

@hauntsaninja hauntsaninja closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants