Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
7aaaa2a3 by Philipp Hörist at 2024-09-07T21:22:47+02:00
fix: Hats: Make struct compareable

- - - - -


1 changed file:

- nbxmpp/structs.py


Changes:

=====================================
nbxmpp/structs.py
=====================================
@@ -1019,6 +1019,14 @@ class HatData:
         except KeyError:
             return self._hat_map.any()
 
+    def __eq__(self, other: Any):
+        if not isinstance(other, HatData):
+            return False
+        return self._hat_map == other._hat_map
+
+    def __ne__(self, other: Any):
+        return not self.__eq__(other)
+
 
 @dataclass
 class EncryptionData:



View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/7aaaa2a3ebf9addda2f4e7f413f2e156fdf728e1

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/7aaaa2a3ebf9addda2f4e7f413f2e156fdf728e1
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to