mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-08 13:10:56 +08:00
Add is_compiled and a few other things to be more compatible with the new way of handling stubs
This commit is contained in:
@@ -255,7 +255,7 @@ class Script(object):
|
||||
context = self._evaluator.create_context(self._get_module(), leaf)
|
||||
definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf)
|
||||
# We don't want stubs here we want the actual contexts, if possible.
|
||||
definitions = try_stubs_to_actual_context_set(definitions)
|
||||
definitions = try_stubs_to_actual_context_set(definitions, prefer_stub_to_compiled=True)
|
||||
|
||||
names = [s.name for s in definitions]
|
||||
defs = [classes.Definition(self._evaluator, name) for name in names]
|
||||
@@ -308,7 +308,7 @@ class Script(object):
|
||||
return isinstance(name, imports.SubModuleName)
|
||||
|
||||
names = filter_follow_imports(names, check)
|
||||
names = try_stubs_to_actual_names(names)
|
||||
names = try_stubs_to_actual_names(names, prefer_stub_to_compiled=True)
|
||||
|
||||
defs = [classes.Definition(self._evaluator, d) for d in set(names)]
|
||||
return helpers.sorted_definitions(defs)
|
||||
|
||||
Reference in New Issue
Block a user