From d7537030053edf07a2ed2fd420544bfa1520db5b Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 20 Nov 2023 21:10:50 -0800 Subject: [PATCH] reformat --- src/black/lines.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/black/lines.py b/src/black/lines.py index cf89d8b..8895f5b 100644 --- a/src/black/lines.py +++ b/src/black/lines.py @@ -684,18 +684,14 @@ def _maybe_empty_lines(self, current_line: Line) -> Tuple[int, int]: return 0, 1 return before, 1 - is_empty_first_line_ok = ( - Preview.allow_empty_first_line_in_block - in current_line.mode - and ( - not is_docstring(current_line.leaves[0]) - # If it's a triple quote comment (but not at the start of a funcdef) - or ( - self.previous_line - and self.previous_line.leaves[0] - and self.previous_line.leaves[0].parent - and not is_funcdef(self.previous_line.leaves[0].parent) - ) + is_empty_first_line_ok = Preview.allow_empty_first_line_in_block in current_line.mode and ( + not is_docstring(current_line.leaves[0]) + # If it's a triple quote comment (but not at the start of a funcdef) + or ( + self.previous_line + and self.previous_line.leaves[0] + and self.previous_line.leaves[0].parent + and not is_funcdef(self.previous_line.leaves[0].parent) ) )