mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-18 03:21:26 +08:00
Make generators return more correct values with while loops, fixes #683
This commit is contained in:
1 parent
d630ed55f3
commit
e930f47861
4 files changed
+13
-8
No files matched your search
@@ -265,7 +265,7 @@ class BaseFunctionExecutionContext(ValueContext, TreeContextMixin):
|
||||
else:
|
||||
types = self.get_return_values(check_yields=True)
|
||||
if types:
|
||||
yield LazyKnownValues(types)
|
||||
yield LazyKnownValues(types, min=0, max=float('inf'))
|
||||
return
|
||||
last_for_stmt = for_stmt
|
||||
|
||||
|
||||
Reference in new issue
Block a user