1
0
forked from VimPlug/jedi

get_signatures should automatically use the stubs if possible

This commit is contained in:
Dave Halter
2018-11-19 09:58:35 +01:00
parent d2c0b13a02
commit cb3cd3022d

View File

@@ -410,7 +410,8 @@ class StubClassContext(_StubContextFilterMixin, ClassMixin, ContextWrapper):
def __getattribute__(self, name):
if name in ('py__getitem__', 'py__simple_getitem__', 'py__bases__',
'execute_annotation', 'list_type_vars', 'define_generics'):
'execute_annotation', 'list_type_vars', 'define_generics',
'get_signatures'):
# getitem is always done in the stub class.
return getattr(self.stub_context, name)
return super(StubClassContext, self).__getattribute__(name)
@@ -425,6 +426,12 @@ class StubFunctionContext(FunctionMixin, ContextWrapper):
def get_function_execution(self, arguments=None):
return self.stub_context.get_function_execution(arguments)
def __getattribute__(self, name):
if name == 'get_signatures':
# getitem is always done in the stub class.
return getattr(self.stub_context, name)
return super(StubFunctionContext, self).__getattribute__(name)
class _StubOnlyContextMixin(object):
_add_non_stubs_in_filter = False