You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system: macOS High Sierra
Python version: 3.7.2 Black version: 19.3b0
Does also happen on master: Yes, in more cases than 19.3b0
Look how the str(err) arguments are changed.
Input
defthing():
err=1msg="""Short docstring. %s"""% (str(err))
msg="""Short docstring. %s %s"""% (str(err), str(err))
msg=""" This is a long docstring. This is a long docstring. This is a long docstring. This is a long docstring. This is a long docstring. This is a long docstring. %s """% (str(err))
msg="""This is a long docstring. This is a long docstring. This is a long docstring. %sThis is a long docstring. This is a long docstring. This is a long docstring. %s"""% (str(err), str(err))
Output with 19.3b0
The str(err) arguments are put on their own lines for long docstrings. They don't need to be changed.
defthing():
err=1msg="""Short docstring. %s"""% (str(err))
msg="""Short docstring. %s %s"""% (str(err), str(err))
msg=""" This is a long docstring. This is a long docstring. This is a long docstring. This is a long docstring. This is a long docstring. This is a long docstring. %s """% (
str(err)
)
msg="""This is a long docstring. This is a long docstring. This is a long docstring. %sThis is a long docstring. This is a long docstring. This is a long docstring. %s"""% (
str(err),
str(err),
)
Output with master
The str(err) arguments are put on their own lines, for long docstrings, and for short docstrings when there's two of them. They don't need to be changed.
defthing():
err=1msg="""Short docstring. %s"""% (str(err))
msg="""Short docstring. %s %s"""% (
str(err),
str(err),
)
msg=""" This is a long docstring. This is a long docstring. This is a long docstring. This is a long docstring. This is a long docstring. This is a long docstring. %s """% (
str(err)
)
msg="""This is a long docstring. This is a long docstring. This is a long docstring. %sThis is a long docstring. This is a long docstring. This is a long docstring. %s"""% (
str(err),
str(err),
)
felix-hilden
changed the title
% formatted arguments put on new lines after docstrings
% formatted arguments put on new lines after multiline strings
Aug 29, 2022
Operating system: macOS High Sierra
Python version: 3.7.2
Black version: 19.3b0
Does also happen on master: Yes, in more cases than 19.3b0
Look how the
str(err)
arguments are changed.Input
Output with 19.3b0
The
str(err)
arguments are put on their own lines for long docstrings. They don't need to be changed.Output with master
The
str(err)
arguments are put on their own lines, for long docstrings, and for short docstrings when there's two of them. They don't need to be changed.https://black.now.sh/?version=master&state=_Td6WFoAAATm1rRGAgAhARYAAAB0L-Wj4AKQAKBdAD2IimZxl1N_WlbvK5V_5XC4HPsJew3HOF1BHgQimRfSJ9q84dUyrSjb0mQnAO7rr9vjV_k61P_liPqH1s3nyKQ1P1dZ74Cja8iu64pXfCf70kAMFzhqj9sC39JI8T_XaEXuIQZyt0F1B4goQbLb0FBmreVkuA-cF_gcpYU3CTJ3yV-c-zcLZ68E2Vq_j3MdTDfxR4OlZ6ESiHDhBXbdK2AAF22UCo9c44sAAbwBkQUAAElqCpCxxGf7AgAAAAAEWVo=
The text was updated successfully, but these errors were encountered: