1
0
forked from VimPlug/jedi

Use Context.create_name instead of weird playing with params everywhere

This commit is contained in:
Dave Halter
2019-09-02 09:38:54 +02:00
parent b4dc95553f
commit a0cadd9375
4 changed files with 15 additions and 13 deletions

View File

@@ -302,8 +302,8 @@ class Script(object):
# Without a name we really just want to jump to the result e.g.
# executed by `foo()`, if we the cursor is after `)`.
return self.goto_definitions(only_stubs=only_stubs, prefer_stubs=prefer_stubs)
context = self._get_module_context().create_context(tree_name)
names = list(self._inference_state.goto(context, tree_name))
name = self._get_module_context().create_name(tree_name)
names = list(name.goto())
if follow_imports:
names = filter_follow_imports(names)