From 283cbeaad489aa2ed5cdb9424a61b6c43acd919d Mon Sep 17 00:00:00 2001 From: minff <16268924+minff@users.noreply.github.com> Date: Fri, 13 Oct 2023 23:34:14 +0200 Subject: [PATCH] update Dict type hint Signed-off-by: minff <16268924+minff@users.noreply.github.com> --- XYZHubConnector/xyz_qgis/gui/platform_auth_dialog.py | 6 ++++-- XYZHubConnector/xyz_qgis/iml/network/network.py | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/XYZHubConnector/xyz_qgis/gui/platform_auth_dialog.py b/XYZHubConnector/xyz_qgis/gui/platform_auth_dialog.py index a604f17..fda9b01 100644 --- a/XYZHubConnector/xyz_qgis/gui/platform_auth_dialog.py +++ b/XYZHubConnector/xyz_qgis/gui/platform_auth_dialog.py @@ -8,6 +8,8 @@ # ############################################################################### +from typing import Dict + from qgis.PyQt.QtCore import pyqtSignal, QSortFilterProxyModel from qgis.PyQt.QtWidgets import QDialog from qgis.PyQt.QtGui import QStandardItem @@ -55,7 +57,7 @@ def config( self, token_model: TokenModel, server_model: ServerModel, - map_conn_info: dict[str, SpaceConnectionInfo], + map_conn_info: Dict[str, SpaceConnectionInfo], ): self._set_connected_conn_info(map_conn_info) @@ -118,7 +120,7 @@ def cb_login_fail(self): def _set_connected_conn_info( self, - map_conn_info: dict[str, SpaceConnectionInfo], + map_conn_info: Dict[str, SpaceConnectionInfo], ): self._connected_conn_info = map_conn_info diff --git a/XYZHubConnector/xyz_qgis/iml/network/network.py b/XYZHubConnector/xyz_qgis/iml/network/network.py index 5fda6cf..50457ea 100644 --- a/XYZHubConnector/xyz_qgis/iml/network/network.py +++ b/XYZHubConnector/xyz_qgis/iml/network/network.py @@ -11,6 +11,7 @@ import time import base64 import json +from typing import Dict from .login_webengine import PlatformUserAuthentication, PlatformAuthLoginView from .net_handler import IMLNetworkHandler @@ -169,7 +170,7 @@ def __init__(self, parent): super().__init__(parent) self.user_auth_module = PlatformUserAuthentication(self.network) self.platform_auth = PlatformAuthLoginView() - self._connected_conn_info: dict[str, SpaceConnectionInfo] = dict() + self._connected_conn_info: Dict[str, SpaceConnectionInfo] = dict() self.load_all_connected_conn_info_from_settings() def _get_api_url(self, server: str, api_group):