1
0
forked from VimPlug/jedi

Fix the last remaining issues of the first part of the NamePart switch.

This commit is contained in:
Dave Halter
2014-09-09 15:58:20 +02:00
parent 45e033c50e
commit b68a59daef
5 changed files with 9 additions and 2 deletions

View File

@@ -388,6 +388,7 @@ class Script(object):
if goto_path:
definitions = set(self._prepare_goto(goto_path))
definitions = resolve_import_paths(definitions)
names = [s if isinstance(s, pr.Name) else s.name for s in definitions
if s is not imports.ImportWrapper.GlobalNamespace]
defs = [classes.Definition(self._evaluator, name.names[-1])

View File

@@ -507,6 +507,7 @@ class Completion(BaseDefinition):
the ``foo.docstring(fast=False)`` on every object, because it
parses all libraries starting with ``a``.
"""
definition = self._definition
if isinstance(definition, pr.Import):
i = imports.ImportWrapper(self._evaluator, definition)
if len(i.import_path) > 1 or not fast: