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
Cannot infer type of lambda regression with mypy 1.9 #17018
The lambda in the following code snippet reports error: Cannot infer type of lambda starting from mypy 1.9.0 (It did not report an error with mypy 1.8.0).
#15459 seems related, but it looks as mypy 1.8.0 also reported an error there.
(The immediate cause of the new false positive was python/typeshed@a08d2d5, but the underlying issue is mypy struggling to solve a TypeVarTuple when you're passing in a lambda.)
Activity
AlexWaygood commentedon Mar 12, 2024
Here's a mimimal repro of the underlying issue that doesn't involve typeshed's stubs for asyncio:
https://mypy-play.net/?mypy=latest&python=3.12&gist=ce433643f1bff8c03f6f8149f7829793
(The immediate cause of the new false positive was python/typeshed@a08d2d5, but the underlying issue is mypy struggling to solve a TypeVarTuple when you're passing in a
lambda.)