Skip to content

Commit b59da99

Browse files
committed
Implement __ne__ using __eq__
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 32d8d71 commit b59da99

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/frequenz/channels/experimental/_grouping_latest_value_cache.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,7 @@ def __ne__(self, value: object, /) -> bool:
214214
Returns:
215215
`True` if the caches are not equal, `False` otherwise.
216216
"""
217-
if not isinstance(value, GroupingLatestValueCache):
218-
return NotImplemented
219-
return self._latest_value_by_key != value._latest_value_by_key
217+
return not self.__eq__(value)
220218

221219
def __delitem__(self, key: HashableT) -> None:
222220
"""Clear the latest value for a specific key.

0 commit comments

Comments
 (0)