1
0
forked from VimPlug/jedi

Fix inferring dict.values()

This commit is contained in:
Dave Halter
2018-09-21 01:09:13 +02:00
parent 43ffcb0802
commit 389d4e3d9c
5 changed files with 19 additions and 5 deletions

View File

@@ -300,6 +300,17 @@ class ContextSet(BaseContextSet):
def get_item(self, *args, **kwargs):
return ContextSet.from_sets(_getitem(c, *args, **kwargs) for c in self._set)
def try_merge(self, function_name):
context_set = self.__class__()
for c in self._set:
try:
method = getattr(c, function_name)
except AttributeError:
pass
else:
context_set |= method()
return context_set
NO_CONTEXTS = ContextSet()