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
on the line with user.username == [1,2,3], which you seemed to mark as # no error. That said, I also get an error on the previous line if I change it to a dataclass, but not with BaseModel.
I suspect the reason for this is that we have defined __eq__ method on BaseModel with other as Any. If we hide that __eq__ from the type-checker using if not typing.TYPE_CHECKING, the issue goes away, so that may be the best fix, I'll run that by the other maintainers and if they agree we can merge it. (Another alternative may be to change the type hint on the other argument to __eq__ but I'm more concerned that changing that may affect other users.
Initial Checks
Description
With mpy pydantic plugin enable when i enable strict equality pydantic comparaison not generate error when i write mistake error
Example Code
mypy .
I got:
Python, Pydantic & OS Version
The text was updated successfully, but these errors were encountered: