Mercurial > libervia-backend
diff libervia/backend/plugins/plugin_xep_0103.py @ 4270:0d7bb4df2343
Reformatted code base using black.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 19 Jun 2024 18:44:57 +0200 |
parents | 4b842c1fb686 |
children | 111dce64dcb5 |
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0103.py Tue Jun 18 12:06:45 2024 +0200 +++ b/libervia/backend/plugins/plugin_xep_0103.py Wed Jun 19 18:44:57 2024 +0200 @@ -48,11 +48,7 @@ log.info(_("XEP-0103 (URL Address Information) plugin initialization")) host.register_namespace("url-data", NS_URL_DATA) - def get_url_data_elt( - self, - url: str, - **kwargs - ) -> domish.Element: + def get_url_data_elt(self, url: str, **kwargs) -> domish.Element: """Generate the element describing the URL @param url: URL to use @@ -63,10 +59,7 @@ url_data_elt["target"] = url return url_data_elt - def parse_url_data_elt( - self, - url_data_elt: domish.Element - ) -> Dict[str, Any]: + def parse_url_data_elt(self, url_data_elt: domish.Element) -> Dict[str, Any]: """Parse <url-data/> element @param url_data_elt: <url-data/> element @@ -77,9 +70,7 @@ """ if url_data_elt.name != "url-data": try: - url_data_elt = next( - url_data_elt.elements(NS_URL_DATA, "url-data") - ) + url_data_elt = next(url_data_elt.elements(NS_URL_DATA, "url-data")) except StopIteration: raise exceptions.NotFound try: