File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -514,12 +514,12 @@ def complete(self, tab: bool = False) -> None:
514514
515515 list_win_visible = repl .Repl .complete (self , tab )
516516
517- f = None
518- if self .matches_iter .completer :
519- f = self .matches_iter .completer .format
520-
521517 if list_win_visible :
522518 try :
519+ f = None
520+ if self .matches_iter .completer :
521+ f = self .matches_iter .completer .format
522+
523523 self .show_list (
524524 self .matches_iter .matches ,
525525 self .arg_pos ,
@@ -1494,10 +1494,6 @@ def tab(self, back: bool = False) -> bool:
14941494 and don't indent if there are only whitespace in the line.
14951495 """
14961496
1497- f = None
1498- if self .matches_iter .completer :
1499- f = self .matches_iter .completer .format
1500-
15011497 # 1. check if we should add a tab character
15021498 if self .atbol () and not back :
15031499 x_pos = len (self .s ) - self .cpos
@@ -1532,6 +1528,10 @@ def tab(self, back: bool = False) -> bool:
15321528 back and self .matches_iter .previous () or next (self .matches_iter )
15331529 )
15341530 try :
1531+ f = None
1532+ if self .matches_iter .completer :
1533+ f = self .matches_iter .completer .format
1534+
15351535 self .show_list (
15361536 self .matches_iter .matches ,
15371537 self .arg_pos ,
Original file line number Diff line number Diff line change @@ -423,6 +423,7 @@ class Repl:
423423 """
424424
425425 if TYPE_CHECKING :
426+
426427 @property
427428 @abstractmethod
428429 def current_line (self ):
You can’t perform that action at this time.
0 commit comments