recent fix for relative imports broke autocomp.

This commit is contained in:
Campbell Barton 2010-10-18 13:16:43 +00:00
parent 799fc68234
commit b1e8d168d7

@ -75,10 +75,10 @@ def complete(line, cursor, namespace, private=True):
# unquoted word -> module or attribute completion
word = re_unquoted_word.group(1)
if RE_MODULE.match(line):
import complete_import
from . import complete_import
matches = complete_import.complete(line)
else:
import complete_namespace
from . import complete_namespace
matches = complete_namespace.complete(word, namespace, private)
else:
# for now we don't have completers for strings
@ -112,7 +112,7 @@ def expand(line, cursor, namespace, private=True):
'abs(number) -> number\\nReturn the absolute value of the argument.'
"""
if line[:cursor].strip().endswith('('):
import complete_calltip
from . import complete_calltip
matches, word, scrollback = complete_calltip.complete(line,
cursor, namespace)
no_calltip = False