You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
report an error when iterating over a generator if its second type parameter is not None #5758
fromcollections.abcimportGeneratorfromtypingimportreveal_typedeffoo() ->Generator[None, str]:
asdf=yieldreveal_type(asdf) # pyrefly: str, runtime: Nonefor_infoo(): # should be an error
...
i think iterating over a Generator should only be allowed if its _SendT_contra is None
Activity
KotlinIsland commentedon Nov 25, 2026