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: Ubuntu Bionic 18.04
Python version: Python 3.6.8 Black version: 19.3b0-80-g3dc461a (packaged as a snap by Canonical IS team - snap install black-canonical-is --edge)
Does also happen on master: yes
I recently converted some code from 80 character to 120 character line lengths using black and found that a string continuation in the form of:
print("string with {} vars "
"issue".format(len(vars)))
will reduce to: print("string with {} vars " "issue".format(len(vars)))
I expect that the two strings would be concattenated together with the interstitial space taken out such that the resulting line would be:
print("string with {} vars issue".format(len(vars)))
It may be that the current assumption is that the multi-line breaks are tuple/function arg passing with comma separation, rather than also considering the string appending use case I have above.
The resulting code is still valid and executes with replacing the proper variables, but I feel that reducing the close/open quotes around the joined lines would be preferable for style and character reduction on the resulting line.
The text was updated successfully, but these errors were encountered:
Operating system: Ubuntu Bionic 18.04
Python version: Python 3.6.8
Black version: 19.3b0-80-g3dc461a (packaged as a snap by Canonical IS team - snap install black-canonical-is --edge)
Does also happen on master: yes
I recently converted some code from 80 character to 120 character line lengths using black and found that a string continuation in the form of:
will reduce to:
print("string with {} vars " "issue".format(len(vars)))
I expect that the two strings would be concattenated together with the interstitial space taken out such that the resulting line would be:
print("string with {} vars issue".format(len(vars)))
It may be that the current assumption is that the multi-line breaks are tuple/function arg passing with comma separation, rather than also considering the string appending use case I have above.
The resulting code is still valid and executes with replacing the proper variables, but I feel that reducing the close/open quotes around the joined lines would be preferable for style and character reduction on the resulting line.
The text was updated successfully, but these errors were encountered: