From 634dc5a20ecc5101040f279ad0f62d976a7a36ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Langa?= Date: Tue, 15 May 2018 12:18:28 -0700 Subject: [PATCH] Warn that `right_hand_split()` modifies `bracket_depth` in leaves --- black.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/black.py b/black.py index 81241f6..9cb6e1d 100644 --- a/black.py +++ b/black.py @@ -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) -- 2.39.5