ikamensh / flynt

A tool to automatically convert old string literal formatting to f-strings
MIT License
685 stars 33 forks source link

Implement PEP 701 – Syntactic formalization of f-strings for Python 3.12+ #191

Open EwoutH opened 1 year ago

EwoutH commented 1 year ago

PEP 701 lifts some restrictions on the usage of f-strings. Expression components inside f-strings can now be any valid Python expression, including strings reusing the same quote as the containing f-string, multi-line expressions, comments, backslashes, and unicode escape sequences.

https://github.com/psf/black/pull/3822 and https://github.com/astral-sh/ruff/pull/7376 might be useful as reference.