forked from VimPlug/jedi
Fix some more context issues
This commit is contained in:
@@ -153,7 +153,7 @@ class MethodValue(FunctionValue):
|
||||
self.class_value = class_value
|
||||
|
||||
def get_default_param_context(self):
|
||||
return self.class_value
|
||||
return self.class_value.as_context()
|
||||
|
||||
def get_qualified_names(self):
|
||||
# Need to implement this, because the parent value of a method
|
||||
|
||||
@@ -473,7 +473,7 @@ class InstanceClassFilter(AbstractFilter):
|
||||
]
|
||||
|
||||
def __repr__(self):
|
||||
return '<%s for %s>' % (self.__class__.__name__, self._class_filter.value)
|
||||
return '<%s for %s>' % (self.__class__.__name__, self._class_filter.context)
|
||||
|
||||
|
||||
class SelfAttributeFilter(ClassFilter):
|
||||
|
||||
@@ -292,12 +292,10 @@ class DictComprehension(ComprehensionMixin, Sequence):
|
||||
def py__simple_getitem__(self, index):
|
||||
for keys, values in self._iterate():
|
||||
for k in keys:
|
||||
# TODO remove this isinstance.
|
||||
if isinstance(k, compiled.CompiledObject):
|
||||
# Be careful in the future if refactoring, index could be a
|
||||
# slice.
|
||||
if k.get_safe_value(default=object()) == index:
|
||||
return values
|
||||
# Be careful in the future if refactoring, index could be a
|
||||
# slice object.
|
||||
if k.get_safe_value(default=object()) == index:
|
||||
return values
|
||||
raise SimpleGetItemNotFound()
|
||||
|
||||
def _dict_keys(self):
|
||||
|
||||
Reference in New Issue
Block a user