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
False positive error on a generic type-preserving function if returning from within an isinstance branch #18658
Mypy does not make deductions of the type of type parameter based on isinstance branches within the function. For example, in a function that takes an argument of any type and returns a value of that same type, it mypy raises an error about the type of the return argument not being correct if returning from within an isinstance branch.
Activity
mgab commentedon Feb 11, 2025
Uops! Tried to find previously reported issues but didn't succeed, sorry for the duplicate! 🙏