Mercurial > libervia-backend
diff libervia/backend/plugins/plugin_misc_uri_finder.py @ 4334:111dce64dcb5
plugins XEP-0300, XEP-0446, XEP-0447, XEP0448 and others: Refactoring to use Pydantic:
Pydantic models are used more and more in Libervia, for the bridge API, and also to
convert `domish.Element` to internal representation.
Type hints have also been added in many places.
rel 453
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 03 Dec 2024 00:12:38 +0100 |
parents | e0ae6ca806ba |
children |
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_misc_uri_finder.py Tue Dec 03 00:11:00 2024 +0100 +++ b/libervia/backend/plugins/plugin_misc_uri_finder.py Tue Dec 03 00:12:38 2024 +0100 @@ -74,12 +74,12 @@ @return (dict[unicode, unicode]): map from key to found uri """ keys_re = "|".join(keys) - label_re = r'\"(?P<label>[^\"]+)\"' + label_re = r"\"(?P<label>[^\"]+)\"" uri_re = re.compile( r"(?P<key>{keys_re})[ :]? +(?P<uri>xmpp:\S+)(?:.*use {label_re} label)?".format( keys_re=keys_re, label_re=label_re ), - re.IGNORECASE + re.IGNORECASE, ) path = os.path.normpath(path) if not os.path.isdir(path) or not os.path.isabs(path):