diff --git a/jedi/evaluate/finder.py b/jedi/evaluate/finder.py index 4a167ee2..11b087be 100644 --- a/jedi/evaluate/finder.py +++ b/jedi/evaluate/finder.py @@ -553,7 +553,7 @@ def check_tuple_assignments(types, name): debug.warning("Invalid tuple lookup #%s of result %s in %s", index, types, name) else: - if r.type == 'dict': + if isinstance(r, iterable.Array) and r.type == 'dict': continue try: new_types |= func(index) diff --git a/test/completion/isinstance.py b/test/completion/isinstance.py index e44312f5..008a1039 100644 --- a/test/completion/isinstance.py +++ b/test/completion/isinstance.py @@ -55,6 +55,13 @@ a fooooo2('') +def isinstance_func(arr): + for value in arr: + if isinstance(value, dict): + # Shouldn't fail, even with the dot. + #? 17 dict() + value. + # ----------------- # Names with multiple indices. # -----------------