typing: reorder jid.bare setter
This commit is contained in:
parent
a57aae792d
commit
3516016f32
1 changed files with 9 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue