diff --git a/jedi/evaluate/context.py b/jedi/evaluate/context.py index 2b2080a1..8a81428c 100644 --- a/jedi/evaluate/context.py +++ b/jedi/evaluate/context.py @@ -98,7 +98,7 @@ class AbstractLazyContext(object): class LazyKnownContext(AbstractLazyContext): """data is a context.""" def infer(self): - yield self.data + return set([self.data]) class LazyKnownContexts(AbstractLazyContext): diff --git a/test/completion/generators.py b/test/completion/generators.py index d8eba2dd..6ffd11a2 100644 --- a/test/completion/generators.py +++ b/test/completion/generators.py @@ -108,7 +108,7 @@ for c in Counter(3, 8): # ----------------- -# tuples +# tuple assignments # ----------------- def gen(): if random.choice([0,1]): @@ -148,6 +148,9 @@ a #? str() b +a, = (a for a in [1]) +#? int() +a # ----------------- # More complicated access