Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions patches/pyink.patch
Original file line number Diff line number Diff line change
Expand Up @@ -724,11 +724,10 @@
+ and not self.previous_line.depth
+ and not current_line.depth
and not current_line.is_import
+ and not current_line.is_comment
and not current_line.is_fmt_pass_converted(first_leaf_matches=is_import)
+ and not current_line.is_fmt_pass_converted()
):
- return 1, 0
+ return (before or 1), 0
return 1, 0

if (
- self.previous_line.is_import
Expand Down
4 changes: 2 additions & 2 deletions src/pyink/lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,10 +708,10 @@ def _maybe_empty_lines(self, current_line: Line) -> tuple[int, int]:
and not self.previous_line.depth
and not current_line.depth
and not current_line.is_import
and not current_line.is_comment
and not current_line.is_fmt_pass_converted(first_leaf_matches=is_import)
and not current_line.is_fmt_pass_converted()
):
return (before or 1), 0
return 1, 0

if (
(
Expand Down
Loading