From 3d2ee5d6bb86349a3501485f604d9f5e120078da Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 7 Jan 2024 00:51:11 +0100 Subject: [PATCH] Replaced some new typing `|` notations with `Union`. The `|` notation breaks on Python < 3.10. --- platypush/plugins/inspect/__init__.py | 2 ++ platypush/plugins/matrix/client.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/inspect/__init__.py b/platypush/plugins/inspect/__init__.py index a41c6d9c3..1449aab34 100644 --- a/platypush/plugins/inspect/__init__.py +++ b/platypush/plugins/inspect/__init__.py @@ -62,6 +62,8 @@ class InspectPlugin(Plugin): e, ) + self.logger.exception(e) + def refresh_cache(self, force: bool = False): """ Refreshes the components cache. diff --git a/platypush/plugins/matrix/client.py b/platypush/plugins/matrix/client.py index 9bf336792..d5a22cd82 100644 --- a/platypush/plugins/matrix/client.py +++ b/platypush/plugins/matrix/client.py @@ -352,7 +352,7 @@ class MatrixClient(AsyncClient): def get_devices_by_user( self, user_id: Optional[str] = None - ) -> Dict[str, Dict[str, OlmDevice]] | Dict[str, OlmDevice]: + ) -> Union[Dict[str, Dict[str, OlmDevice]], Dict[str, OlmDevice]]: devices = dict(self.device_store.items()) if user_id: @@ -371,7 +371,7 @@ class MatrixClient(AsyncClient): def get_devices_by_room( self, room_id: Optional[str] = None - ) -> Dict[str, Dict[str, OlmDevice]] | Dict[str, OlmDevice]: + ) -> Union[Dict[str, Dict[str, OlmDevice]], Dict[str, OlmDevice]]: devices = { room_id: { device_id: device