microsoft / vscode-black-formatter

Formatting support for Python using the Black formatter
https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter
MIT License
146 stars 35 forks source link

Doesn't support 3.12 f-strings #386

Closed MaskdDev closed 7 months ago

MaskdDev commented 8 months ago

Python 3.12 added the ability to use quotations of the same type within an f-string, such as below:

f"This is an f-string {func("With quotes in it")}."

Black Formatter throws an "unable to parse" error, preventing it from formatting the file :(

karthiknadig commented 7 months ago

@MaskdDev Does this work when you run black from the command line?

karthiknadig commented 7 months ago

This is not related to this extension. black does not support 3.12 f-strings. image

please file this on black here: https://github.com/psf/black/issues

MaskdDev commented 7 months ago

Alright, thank you!