File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -608,12 +608,12 @@ def _complete(self, unused_tab=False):
608608 # Check for import completion
609609 e = False
610610 matches = importcompletion .complete (self .s , cw )
611- if matches is None :
611+ if matches is not None and not matches :
612612 self .matches = []
613613 self .scr .redrawwin ()
614614 return False
615615
616- if not matches :
616+ if matches is None :
617617 # Nope, no import, continue with normal completion
618618 try :
619619 self .completer .complete (cw , 0 )
Original file line number Diff line number Diff line change @@ -37,15 +37,15 @@ def complete(line, cw):
3737
3838 tokens = line .split ()
3939 if tokens [0 ] not in ['from' , 'import' ]:
40- return list ()
40+ return None
4141
4242 completing_from = False
4343 if tokens [0 ] == 'from' :
4444 if len (tokens ) > 3 :
4545 if '.' in cw :
4646 # This will result in a SyntaxError, so do not return
4747 # any matches
48- return list ()
48+ return None
4949 completing_from = True
5050 cw = '%s.%s' % (tokens [1 ], cw )
5151 elif len (tokens ) == 3 :
@@ -59,7 +59,7 @@ def complete(line, cw):
5959 name = name [len (tokens [1 ]) + 1 :]
6060 matches .append (name )
6161 if not matches :
62- return None
62+ return []
6363 return matches
6464
6565
You can’t perform that action at this time.
0 commit comments