summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2020-05-29 17:33:44 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2020-05-29 23:35:31 +0200
commit9e8ac6b7697309af6c36d555bcf0b18e0fea6a42 (patch)
tree0aba8d825773cee1c723394086e49410c85e9b26
parent3b3eed544ef9a37b0a4036299f7fdc230733dc0b (diff)
downloadslixmpp-9e8ac6b7697309af6c36d555bcf0b18e0fea6a42.tar.gz
slixmpp-9e8ac6b7697309af6c36d555bcf0b18e0fea6a42.tar.bz2
slixmpp-9e8ac6b7697309af6c36d555bcf0b18e0fea6a42.tar.xz
slixmpp-9e8ac6b7697309af6c36d555bcf0b18e0fea6a42.zip
XEP-0045: Add some types in stanza
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--slixmpp/plugins/xep_0045/stanza.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/slixmpp/plugins/xep_0045/stanza.py b/slixmpp/plugins/xep_0045/stanza.py
index 7d52f53a..c18ec787 100644
--- a/slixmpp/plugins/xep_0045/stanza.py
+++ b/slixmpp/plugins/xep_0045/stanza.py
@@ -27,13 +27,13 @@ class MUCPresence(ElementBase):
affiliations = {'', }
roles = {'', }
- def get_item_attr(self, attr, default):
- item = self.xml.find('{{{NS_USER}}}item')
+ def get_item_attr(self, attr, default: str):
+ item = self.xml.find(f'{{{NS_USER}}}item')
if item is None:
return default
return item.get(attr)
- def set_item_attr(self, attr, value):
+ def set_item_attr(self, attr, value: str):
item = self.xml.find(f'{{{NS_USER}}}item')
if item is None:
item = ET.Element(f'{{{NS_USER}}}item')
@@ -42,7 +42,7 @@ class MUCPresence(ElementBase):
return item
def del_item_attr(self, attr):
- item = self.xml.find('{{{NS_USER}}}item')
+ item = self.xml.find(f'{{{NS_USER}}}item')
if item is not None and attr in item.attrib:
del item.attrib[attr]