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
Better error message when union may not have been narrowed #17036
I think mypy's behaviour is fine as-is. It's not clear that this is an issue users are confused about, or that recommending an if is better than recommending an assert
Activity
Eben-Success commentedon Mar 22, 2024
I want to fix this issue.
keshavt3 commentedon Apr 3, 2024
I want to work on this.
kr321 commentedon Apr 8, 2024
I would like to work on this with a group for a college software engineering class.
hauntsaninja commentedon Apr 8, 2024
Any of you please feel free to, just post on this issue when you have an open PR that passes tests!
GabrielAguirre1 commentedon Apr 9, 2024
I would similarly like to work on it.
biswaisop commentedon Jun 18, 2024
I want to fix this
Prabhat-Thapa45 commentedon Jul 24, 2024
I felt many people missed what you( @JukkaL ) meant by often None to only none. I have added hint for all the missing attribute in my pr.
Issue python#17036 fixed
paulorochaoliveira commentedon Dec 6, 2024
I believe this issue can be closed.
brianschubert commentedon Dec 6, 2024
I don't think a PR for this issue has been merged yet (the merged PR above is on a fork).
paulorochaoliveira commentedon Dec 6, 2024
@brianschubert You're right. My bad.
Suggest narrowing for None in union attribute errors
hauntsaninja commentedon Mar 27, 2026
I think mypy's behaviour is fine as-is. It's not clear that this is an issue users are confused about, or that recommending an
ifis better than recommending anassert