From f44f054f56e3a3bdabb49af1ed7ad61977b7fc0d Mon Sep 17 00:00:00 2001 From: Campbell Alden Date: Thu, 3 Sep 2026 22:56:14 +0900 Subject: [PATCH] Implement equality for SecretBox --- src/utils/secret.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/secret.py b/src/utils/secret.py index 1828827..15fdc96 100644 --- a/src/utils/secret.py +++ b/src/utils/secret.py @@ -7,6 +7,12 @@ class SecretBox[T]: def expose_secret(self) -> T: return self._item + def __eq__(self, other): + if not isinstance(other, SecretBox): + return False + + return self._item == other._item + def __str__(self): return ''