Commit 634dc5a2 authored by Łukasz Langa's avatar Łukasz Langa
Browse files

Warn that `right_hand_split()` modifies `bracket_depth` in leaves

parent 14ba1bf8
Loading
Loading
Loading
Loading
+2 −0
Changes for black.py: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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)