From dba3c2695c59fdb11825dbdf8f3b0ab6e0b368b2 Mon Sep 17 00:00:00 2001 From: "Yilei \"Dolee\" Yang" Date: Sun, 19 Mar 2023 07:43:39 -0700 Subject: [PATCH] Fix bug introduced in #3564. (#3615) --- src/black/lines.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/black/lines.py b/src/black/lines.py index b2bdcc441b4..fb5933ecbfb 100644 --- a/src/black/lines.py +++ b/src/black/lines.py @@ -598,7 +598,7 @@ def _maybe_empty_lines(self, current_line: Line) -> Tuple[int, int]: before = 1 elif ( not depth - and self.previous_defs[-1] + and self.previous_defs[-1].depth and current_line.leaves[-1].type == token.COLON and ( current_line.leaves[0].value