fix: Implement Truthy.__eq __

Implement equality check, compare with True rather than self for a Truthy instance

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
This commit is contained in:
gavin 2024-05-13 12:13:41 +02:00 committed by Gavin D'souza
parent 9c20649022
commit 665a18b063
No known key found for this signature in database
GPG key ID: 5413A43FBD450A34

View file

@ -1178,6 +1178,9 @@ class Truthy:
def __bool__(self):
return True
def __eq__(self, other: object) -> bool:
return True == other # noqa: E712
def __repr__(self) -> str:
_val = "UNSET" if self.value is UNSET else self.value
_ctx = "UNSET" if self.context is UNSET else self.context