We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f9a9b2 commit 399692fCopy full SHA for 399692f
bpython/importcompletion.py
@@ -34,18 +34,17 @@ def complete(line, cw):
34
"""Construct a full list of possibly completions for imports."""
35
tokens = line.split()
36
if tokens[0] in ['from', 'import']:
37
+ completing_from = False
38
if tokens[0] == 'from':
- completing_from = True
39
if len(tokens) > 3:
40
if '.' in cw:
41
# This will result in a SyntaxError, so do not return
42
# any matches
43
return list()
44
+ completing_from = True
45
cw = '%s.%s' % (tokens[1], cw)
46
elif len(tokens) == 3:
47
return ['import']
- else:
48
- completing_from = False
49
50
matches = list()
51
for name in modules:
0 commit comments