From 1ebf82c878229d9f2446d627e510cf52c1b2110a Mon Sep 17 00:00:00 2001 From: Silas Kraume Date: Thu, 1 Aug 2024 15:15:13 +0200 Subject: [PATCH] fix flake8 formatting --- babi/file.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/babi/file.py b/babi/file.py index c93c505..ecc6652 100644 --- a/babi/file.py +++ b/babi/file.py @@ -190,16 +190,22 @@ def __init__( def __iter__(self) -> _SearchIter: return self - def calc_past_original_offset(self, y: int, match: Match[str], replacement: str) -> None: + def calc_past_original_offset( + self, y: int, match: Match[str], replacement: str + ) -> None: if not self.wrapped or y != self._start_y: return - self.original_line_change_diff += len(replacement) - (match.end() - match.start()) + self.original_line_change_diff += ( + len(replacement) - match.end() - match.start() + ) def _stop_if_past_original(self, y: int, match: Match[str]) -> Found: if ( self.wrapped and ( y > self._start_y or - y == self._start_y and match.start() >= self._start_x + self.original_line_change_diff + y == self._start_y and match.start() >= ( + self._start_x + self.original_line_change_diff + ) ) ): raise StopIteration()