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
ZeeD
changed the title
"Incompatible types in assignment" on callable return type related to classes __call__ methods
"Incompatible types in assignment" on assignment of ternary operator of instances of classes with __call__
Jan 26, 2024
Bug Report
I'm facing a false positive with the ternary assignment on a callable
To Reproduce
https://mypy-play.net/?mypy=latest&python=3.12&gist=e0b946c6f8cc1379b98c755cdc773b92
Expected Behavior
No errors
Actual Behavior
Incompatible types in assignment (expression has type "object", variable has type "Callable[[], None]") [assignment]
Your Environment
mypy 1.8.0 (compiled: yes)
strict = true
Python 3.12.1
(edit: simplified example)
The text was updated successfully, but these errors were encountered: