Merge branch 'optional-setters' into 'master'

JID: Make node and resource setters accept None

See merge request poezio/slixmpp!214
This commit is contained in:
Maxime Buquet 2022-08-21 12:22:17 +00:00
commit 6904ae63f5

View file

@ -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()