mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Fix a few things that were broken by the mixed object refactoring.
This commit is contained in:
@@ -175,7 +175,6 @@ class AbstractInstanceContext(Context):
|
||||
|
||||
|
||||
class CompiledInstance(AbstractInstanceContext):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(CompiledInstance, self).__init__(*args, **kwargs)
|
||||
# I don't think that dynamic append lookups should happen here. That
|
||||
@@ -246,8 +245,9 @@ class CompiledInstanceClassFilter(compiled.CompiledObjectFilter):
|
||||
)
|
||||
self._instance = instance
|
||||
|
||||
def _create(self, name):
|
||||
return self.name_class(self._evaluator, self._instance, self._compiled_obj, name)
|
||||
def _create_name(self, name):
|
||||
return self.name_class(
|
||||
self._evaluator, self._instance, self._compiled_object, name)
|
||||
|
||||
|
||||
class BoundMethod(er.FunctionContext):
|
||||
|
||||
@@ -39,6 +39,7 @@ from jedi.evaluate import precedence
|
||||
|
||||
class AbstractSequence(context.Context):
|
||||
builtin_methods = {}
|
||||
api_type = 'instance'
|
||||
|
||||
def __init__(self, evaluator):
|
||||
super(AbstractSequence, self).__init__(evaluator, evaluator.BUILTINS)
|
||||
|
||||
@@ -193,6 +193,8 @@ class IntegrationTestCase(object):
|
||||
module_context = script._get_module()
|
||||
# The context shouldn't matter for the test results.
|
||||
user_context = get_user_scope(module_context, (self.line_nr, 0))
|
||||
if user_context.api_type == 'function':
|
||||
user_context = user_context.get_function_execution()
|
||||
element.parent = user_context.get_node()
|
||||
results = evaluator.eval_element(user_context, element)
|
||||
if not results:
|
||||
|
||||
Reference in New Issue
Block a user