forked from VimPlug/jedi
Start implementing overload function
This commit is contained in:
@@ -48,7 +48,7 @@ class StdlibPlugin(BasePlugin):
|
||||
def execute(self, callback):
|
||||
def wrapper(context, arguments):
|
||||
if isinstance(context, BoundMethod):
|
||||
return callback(context, arguments)
|
||||
return callback(context, arguments=arguments)
|
||||
|
||||
debug.dbg('execute: %s %s', context, arguments)
|
||||
try:
|
||||
@@ -69,8 +69,8 @@ class StdlibPlugin(BasePlugin):
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
return func(self._evaluator, context, arguments)
|
||||
return callback(context, arguments)
|
||||
return func(self._evaluator, context, arguments=arguments)
|
||||
return callback(context, arguments=arguments)
|
||||
|
||||
return wrapper
|
||||
|
||||
|
||||
@@ -311,7 +311,8 @@ class StubModuleContext(_StubContextFilterMixin, ModuleContext):
|
||||
|
||||
class StubClassContext(_StubContextFilterMixin, ClassContext):
|
||||
def __getattribute__(self, name):
|
||||
if name == ('py__getitem__', 'py__simple_getitem__', 'py__bases__'):
|
||||
if name in ('py__getitem__', 'py__simple_getitem__', 'py__bases__',
|
||||
'execute_annotation'):
|
||||
# getitem is always done in the stub class.
|
||||
return getattr(self.stub_context, name)
|
||||
return super(StubClassContext, self).__getattribute__(name)
|
||||
|
||||
Reference in New Issue
Block a user