diff --git a/libervia/backend/plugins/plugin_misc_download.py b/libervia/backend/plugins/plugin_misc_download.py index f26d4f61..97930413 100644 --- a/libervia/backend/plugins/plugin_misc_download.py +++ b/libervia/backend/plugins/plugin_misc_download.py @@ -277,12 +277,12 @@ class DownloadPlugin(object): callback: Callable[ [ SatXMPPEntity, - Dict[str, Any], - Dict[str, Any], + dict[str, Any], + dict[str, Any], Union[str, Path], - Dict[str, Any], + dict[str, Any], ], - Tuple[str, defer.Deferred], + tuple[str, defer.Deferred], ], ) -> None: """Register a handler to manage a type of attachment source @@ -295,11 +295,11 @@ class DownloadPlugin(object): source used. The callabke must return a tuple with: - progress ID - - a Deferred which fire whant the file is fully downloaded + - a Deferred which fire when the file is fully downloaded """ - if source_type is self._download_callbacks: + if source_type in self._download_callbacks: raise exceptions.ConflictError( - f"The is already a callback registered for source type {source_type!r}" + f"There is already a callback registered for source type {source_type!r}" ) self._download_callbacks[source_type] = callback diff --git a/libervia/backend/plugins/plugin_misc_text_syntaxes.py b/libervia/backend/plugins/plugin_misc_text_syntaxes.py index 35eb45a5..e5c51569 100644 --- a/libervia/backend/plugins/plugin_misc_text_syntaxes.py +++ b/libervia/backend/plugins/plugin_misc_text_syntaxes.py @@ -43,7 +43,7 @@ try: except ImportError: raise exceptions.MissingModule( 'Missing module "lxml_html_clean". Please download and install it from ' - 'http://lxml.de/. Note that this is a separate package to install in addition ' + "http://lxml.de/. Note that this is a separate package to install in addition " 'to "lxml".' ) diff --git a/libervia/backend/plugins/plugin_misc_uri_finder.py b/libervia/backend/plugins/plugin_misc_uri_finder.py index d03c9f63..d42cf0a1 100644 --- a/libervia/backend/plugins/plugin_misc_uri_finder.py +++ b/libervia/backend/plugins/plugin_misc_uri_finder.py @@ -74,12 +74,12 @@ class URIFinder(object): @return (dict[unicode, unicode]): map from key to found uri """ keys_re = "|".join(keys) - label_re = r'\"(?P