From 1caada197ab92cfcd53b8dff8982be235f129047 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 21 Aug 2022 14:18:53 +0200 Subject: [PATCH] JID: Make node and resource setters accept None This is the proper way to unset these. --- slixmpp/jid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slixmpp/jid.py b/slixmpp/jid.py index d02f98a3..c705a422 100644 --- a/slixmpp/jid.py +++ b/slixmpp/jid.py @@ -368,7 +368,7 @@ class JID: return self._node @node.setter - def node(self, value: str): + def node(self, value: Optional[str]): self._node = _validate_node(value) self._update_bare_full() @@ -386,7 +386,7 @@ class JID: return self._resource @resource.setter - def resource(self, value: str): + def resource(self, value: Optional[str]): self._resource = _validate_resource(value) self._update_bare_full()