mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-18 19:45:57 +08:00
Actually use the stub files
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user