X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/6dca5278a3159cb35e8b9076bf81eacd35c1f0a7..e027fc9e75daadd7e22f12e6e1e374bcca998087:/black.py?ds=sidebyside diff --git a/black.py b/black.py index 5e357ba..00de8d2 100644 --- a/black.py +++ b/black.py @@ -2406,7 +2406,9 @@ def split_line( # All splits failed, best effort split with no omits. # This mostly happens to multiline strings that are by definition # reported as not fitting a single line. - yield from right_hand_split(line, line_length, features=features) + # line_length=1 is silly, but somehow produces better formatting + # than other things we've tried so far. See #762 and #781. + yield from right_hand_split(line, line_length=1, features=features) if line.inside_brackets: split_funcs = [delimiter_split, standalone_comment_split, rhs]