From 2dde200a272b21109d53144affba15545b199ecc Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Tue, 14 Jan 2025 10:40:39 +0100 Subject: [PATCH] reformat --- IPython/terminal/shortcuts/auto_suggest.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/IPython/terminal/shortcuts/auto_suggest.py b/IPython/terminal/shortcuts/auto_suggest.py index a014f2bd9c6..88b7e7ad18e 100644 --- a/IPython/terminal/shortcuts/auto_suggest.py +++ b/IPython/terminal/shortcuts/auto_suggest.py @@ -52,12 +52,12 @@ def apply_transformation(self, ti: TransformationInput) -> Transformation: We can resume showing the normal line, and say that some code may be hidden. - the completions ends at the end of the buffer We can just say that some code may be hidden. - + And separately: - the completions ends beyond the end of the buffer We need to both say that some code may be hidden, and that some lines are not shown. - + """ last_line_number = ti.document.line_count - 1 is_last_line = ti.lineno == last_line_number @@ -74,9 +74,9 @@ def apply_transformation(self, ti: TransformationInput) -> Transformation: delta = ti.lineno - ti.document.cursor_position_row suggestions = buffer.suggestion.text.splitlines() - suggestions_longer_than_buffer:bool = (len(suggestions) + ti.document.cursor_position_row > ti.document.line_count) - - + suggestions_longer_than_buffer: bool = ( + len(suggestions) + ti.document.cursor_position_row > ti.document.line_count + ) if delta == 0: suggestion = suggestions[0]