File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 6868 Tuple ,
6969 Collection ,
7070 Dict ,
71+ Literal ,
7172)
7273import unicodedata
7374from dataclasses import dataclass
@@ -1330,7 +1331,7 @@ def show_list(
13301331 arg_pos : Union [str , int , None ],
13311332 topline : Any = None , # Named tuples don't play nice with mypy
13321333 formatter : Optional [Callable ] = None ,
1333- current_item : Optional [str ] = None ,
1334+ current_item : Union [str , Literal [ False ] ] = None ,
13341335 ) -> None :
13351336 v_items : Collection
13361337 shared = ShowListState ()
@@ -1527,9 +1528,8 @@ def tab(self, back: bool = False) -> bool:
15271528
15281529 # 4. swap current word for a match list item
15291530 elif self .matches_iter .matches :
1530- n : str = next (self .matches_iter )
1531- current_match : Optional [str ] = (
1532- back and self .matches_iter .previous () or n
1531+ current_match : Union [str , Literal [False ]] = (
1532+ back and self .matches_iter .previous () or next (self .matches_iter )
15331533 )
15341534 try :
15351535 self .show_list (
You can’t perform that action at this time.
0 commit comments