forked from VimPlug/jedi
Implement is_stub and goto_stubs for the API
This commit is contained in:
@@ -102,6 +102,10 @@ class Context(HelperContextMixin, BaseContext):
|
||||
To be defined by subclasses.
|
||||
"""
|
||||
tree_node = None
|
||||
stub_context = None
|
||||
|
||||
def is_stub(self):
|
||||
return False
|
||||
|
||||
@property
|
||||
def api_type(self):
|
||||
|
||||
@@ -87,6 +87,9 @@ class StubMethodContext(StubFunctionContext):
|
||||
class _StubOnlyContextMixin(object):
|
||||
_add_non_stubs_in_filter = False
|
||||
|
||||
def is_stub(self):
|
||||
return True
|
||||
|
||||
def _get_stub_only_filters(self, **filter_kwargs):
|
||||
return [StubOnlyFilter(
|
||||
self.evaluator,
|
||||
@@ -155,6 +158,9 @@ class _CompiledStubContext(ContextWrapper):
|
||||
super(_CompiledStubContext, self).__init__(stub_context)
|
||||
self._compiled_context = compiled_context
|
||||
|
||||
def is_stub(self):
|
||||
return True
|
||||
|
||||
def py__doc__(self, include_call_signature=False):
|
||||
doc = self._compiled_context.py__doc__()
|
||||
if include_call_signature:
|
||||
|
||||
Reference in New Issue
Block a user