forked from platypush/platypush
Replaced some new typing |
notations with Union
.
The `|` notation breaks on Python < 3.10.
This commit is contained in:
parent
1cd328ef44
commit
3d2ee5d6bb
2 changed files with 4 additions and 2 deletions
|
@ -62,6 +62,8 @@ class InspectPlugin(Plugin):
|
|||
e,
|
||||
)
|
||||
|
||||
self.logger.exception(e)
|
||||
|
||||
def refresh_cache(self, force: bool = False):
|
||||
"""
|
||||
Refreshes the components cache.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue