summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-07-04 15:59:46 +0200
committermathieui <mathieui@mathieui.net>2021-07-04 15:59:46 +0200
commit3516016f327b18abcdbce9594694f6cea290f1ab (patch)
tree8d683bd4cc3fd4fed58d788eba897b9c411af3c7
parenta57aae792d14a46bb400c0305956a77431b5bca7 (diff)
downloadslixmpp-3516016f327b18abcdbce9594694f6cea290f1ab.tar.gz
slixmpp-3516016f327b18abcdbce9594694f6cea290f1ab.tar.bz2
slixmpp-3516016f327b18abcdbce9594694f6cea290f1ab.tar.xz
slixmpp-3516016f327b18abcdbce9594694f6cea290f1ab.zip
typing: reorder jid.bare setter
-rw-r--r--slixmpp/jid.py17
1 files 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