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
It seems type narrowing is not being propagated to closures, but only in function defs (I checked the above with a lamba and the narrowing is propagated). The narrowing stays after the function definition, just not within.
Running
mypy --strict-optional
on the following code:fails with
This is pretty weird -- MyPy knows that
timestamps
isn'tNone
at that point, but complains in the nested function.The text was updated successfully, but these errors were encountered: