Warn that right_hand_split() modifies bracket_depth in leaves

This commit is contained in:
Łukasz Langa 2018-05-15 12:18:28 -07:00
parent 14ba1bf8b6
commit 634dc5a20e

View File

@ -2013,6 +2013,8 @@ def right_hand_split(
If the split was by optional parentheses, attempt splitting without them, too.
`omit` is a collection of closing bracket IDs that shouldn't be considered for
this split.
Note: running this function modifies `bracket_depth` on the leaves of `line`.
"""
head = Line(depth=line.depth)
body = Line(depth=line.depth + 1, inside_brackets=True)