From 3516016f327b18abcdbce9594694f6cea290f1ab Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 4 Jul 2021 15:59:46 +0200 Subject: [PATCH] typing: reorder jid.bare setter --- slixmpp/jid.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/slixmpp/jid.py b/slixmpp/jid.py index c0143b40..adde95a4 100644 --- a/slixmpp/jid.py +++ b/slixmpp/jid.py @@ -354,6 +354,15 @@ class JID: def bare(self) -> str: return self._bare + @bare.setter + def bare(self, value: str): + node, domain, resource = _parse_jid(value) + assert not resource + self._node = node + self._domain = domain + self._update_bare_full() + + @property def node(self) -> str: return self._node @@ -372,14 +381,6 @@ class JID: self._domain = _validate_domain(value) self._update_bare_full() - @bare.setter - def bare(self, value: str): - node, domain, resource = _parse_jid(value) - assert not resource - self._node = node - self._domain = domain - self._update_bare_full() - @property def resource(self) -> str: return self._resource