1
0
forked from VimPlug/jedi

Add only_stubs and prefer_stubs as parameters to goto_assignments/goto_definitions

This commit is contained in:
Dave Halter
2019-06-10 15:59:12 +02:00
parent 49f652a2ad
commit c8937ccdbf
6 changed files with 107 additions and 42 deletions

View File

@@ -136,6 +136,14 @@ def actual_to_stub_names(names, fallback_to_actual=False):
yield name
def convert_names(names, only_stubs, prefer_stubs):
with debug.increase_indent_cm('convert names'):
if only_stubs or prefer_stubs:
return actual_to_stub_names(names, fallback_to_actual=prefer_stubs)
else:
return try_stub_to_actual_names(names, prefer_stub_to_compiled=True)
def to_stub(context):
if context.is_stub():
return ContextSet([context])