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
dataclasses.is_dataclass() assumed always true when passed type #9854
In the latest 1.1.1 build of Mypy I've started getting various errors such as 'code is unreachable' or 'statement is always true' around certain uses of dataclasses.is_dataclass(). It seems to happen when the argument to is_dataclass() is a type.
Mypy should not assume is_dataclass() always returns True when passed a type.
Actual Behavior
Mypy assumes is_dataclass() always return True when passed a type.
Your Environment
Seeing the error in Mypy 1.1.1 from home-brew on a Mac. 1.1.1 does not seem to be available on the playground but the 'mypy-master-branch' currently exhibits the error.
Apologies for the regression. This has already been fixed in 4ca0c48, but the fix didn't make it into mypy 1.1.1. It's possible mypy will be willing to make a patch release for this.
Activity
AlexWaygood commentedon Mar 7, 2023
Apologies for the regression. This has already been fixed in 4ca0c48, but the fix didn't make it into mypy 1.1.1. It's possible mypy will be willing to make a patch release for this.
srittau commentedon Mar 8, 2023
I'm going to close this here as this seems to be a mypy bug, not related to typeshed.