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]