1
0
forked from VimPlug/jedi

Fix some more context issues

This commit is contained in:
Dave Halter
2019-08-19 19:33:12 +02:00
parent f54617867d
commit b19ba12566
7 changed files with 41 additions and 43 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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):
+4 -6
View File
@@ -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):