-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
F: stringsRelated to our handling of stringsRelated to our handling of stringsT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?
Description
Is your feature request related to a problem? Please describe.
Black should normalize the prefix used for raw f-strings (https://www.python.org/dev/peps/pep-0498/#raw-f-strings). Both rf
and fr
work, but one should be preferred.
Currently, the following code is not changed:
f = rf"hello {world}"
f = fr"hello {world}"
Describe the solution you'd like
Pick one and normalize. I don't really care which. rf
matches the name "raw f-string", but fr
matches the example in PEP-498 and Jupyterlab syntax highlighting seems to prefer it.
Describe alternatives you've considered
Doing nothing leaves open the opportunity for inconsistency and disagreement.
Additional context
None
cooperlees, gschaffner and mcflugen
Metadata
Metadata
Assignees
Labels
F: stringsRelated to our handling of stringsRelated to our handling of stringsT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?