typing: reorder jid.bare setter

This commit is contained in:
mathieui 2021-07-04 15:59:46 +02:00
parent a57aae792d
commit 3516016f32

View file

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