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
@erictraut@AlexWaygood#2608 is closed as done, but this examples still fails. Also note that using a nested def works, only lambdas are affected. Maybe there's a separate bug with lambdas?
Bug Report
When returning a lambda containing an uncaptured variable, mypy losing conditional information about the type of that variable.
To Reproduce
https://mypy-play.net/?mypy=latest&python=3.11&gist=634d85b9f00175d6b4a1f4929d3ba848
Expected Behavior
no error for lambda or inner function
Actual Behavior
the returned lambda results in an error
Your Environment
The text was updated successfully, but these errors were encountered: