Black result not equivalent to the source with multiline format string in a function #2683
Labels
F: docstrings
How we format docstrings
F: strings
Related to our handling of strings
T: bug
Something isn't working
Describe the bug
TLDR: Black produced code that is not equivalent to the source on pass 1 when processing a multiline format string in the first line of the body of the function.
While this is a proper doctoring:
this isn't:
Regardless, however, it is a valid python code, even though it might not produce the desired output:
Black formats both of the above functions fine, but breaks when a newline is introduced after the trailing format string:
See below for an example.
To Reproduce
This is the content of
file.py
:It runs in python, but fails with black.
Here is the content of the diff file:
Environment
The text was updated successfully, but these errors were encountered: