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:
parent
9c20649022
commit
665a18b063
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue