diff --git a/src/pyink/lines.py b/src/pyink/lines.py index 1e2d6457539..99948615e3c 100644 --- a/src/pyink/lines.py +++ b/src/pyink/lines.py @@ -595,6 +595,7 @@ def maybe_empty_lines(self, current_line: Line) -> LinesBlock: and self.previous_block.previous_block is None and len(self.previous_block.original_line.leaves) == 1 and self.previous_block.original_line.is_triple_quoted_string + and not (current_line.is_class or current_line.is_def) ): before = 1