Actually use the stub files

This commit is contained in:
Dave Halter
2018-08-06 23:14:58 +02:00
parent 97c9aca245
commit 62a941f233
2 changed files with 5 additions and 4 deletions

View File

@@ -290,5 +290,5 @@ class ClassStubContext(_StubContextFilterMixin, ClassContext):
class FunctionStubContext(_MixedStubContextMixin, FunctionContext):
def py__call__(self, arguments):
return self.stub_context.py__call__(arguments)
def get_function_execution(self, arguments):
return self.stub_context.get_function_execution(arguments)

View File

@@ -1,7 +1,7 @@
import os
from jedi.plugins import typeshed
from jedi.evaluate.context import TreeInstance, BoundMethod
from jedi.evaluate.context import TreeInstance, BoundMethod, CompiledInstance
from parso.utils import PythonVersionInfo
TYPESHED_PYTHON3 = os.path.join(typeshed._TYPESHED_PATH, 'stdlib', '3')
@@ -77,4 +77,5 @@ def test_method(Script):
def_, = Script(code + '()').goto_definitions()
context = def_._name._context
assert isinstance(context, BoundMethod), context
assert isinstance(context, CompiledInstance)
assert context.class_context.py__name__() == 'str'