diff --git a/XYZHubConnector/xyz_qgis/layer/edit_buffer.py b/XYZHubConnector/xyz_qgis/layer/edit_buffer.py index 61d0538..3b50de2 100644 --- a/XYZHubConnector/xyz_qgis/layer/edit_buffer.py +++ b/XYZHubConnector/xyz_qgis/layer/edit_buffer.py @@ -12,7 +12,6 @@ from qgis.PyQt.QtCore import Qt from . import parser -from .layer_props import QProps from .layer_utils import ( get_feat_upload_from_iter, is_layer_committed, diff --git a/XYZHubConnector/xyz_qgis/layer/queue.py b/XYZHubConnector/xyz_qgis/layer/queue.py index a82ecb9..ec750e1 100644 --- a/XYZHubConnector/xyz_qgis/layer/queue.py +++ b/XYZHubConnector/xyz_qgis/layer/queue.py @@ -10,7 +10,7 @@ from collections import deque from . import bbox_utils -from typing import Iterable +from typing import Dict, List from ..common.utils import get_current_millis_time @@ -23,7 +23,7 @@ class ParamsQueue(object): if response error, retry with smaller limit from h0 to h1 """ - def __init__(self, params: Iterable, **kw): + def __init__(self, params: Dict, **kw): raise NotImplementedError() def has_next(self) -> bool: @@ -45,7 +45,7 @@ def has_retry(self) -> bool: class SimpleQueue(ParamsQueue): """Simple params queue with setter, getter""" - def __init__(self, params: list = None, key=None, **kw): + def __init__(self, params: List = None, key=None, **kw): self._queue = list() self.idx = 0 if params: @@ -151,7 +151,7 @@ class ParamsQueue_deque_v1(ParamsQueue): If response error, retry with smaller limit from h0 to h1. """ - def __init__(self, params, buffer_size=1): + def __init__(self, params: Dict, buffer_size=1): self._buffer_size = buffer_size self.retries = 0 self.limit = params.get("limit", 1) diff --git a/XYZHubConnector/xyz_qgis/models/filter_model.py b/XYZHubConnector/xyz_qgis/models/filter_model.py index 4aa4069..e4fa415 100644 --- a/XYZHubConnector/xyz_qgis/models/filter_model.py +++ b/XYZHubConnector/xyz_qgis/models/filter_model.py @@ -9,9 +9,7 @@ ############################################################################### -from qgis.PyQt.QtGui import QStandardItemModel, QStandardItem -from qgis.PyQt.QtCore import QIdentityProxyModel, Qt, QVariant -from .token_model import EditableItemModel, UsedToken +from .token_model import EditableItemModel class FilterModel(EditableItemModel): diff --git a/XYZHubConnector/xyz_qgis/models/token_model.py b/XYZHubConnector/xyz_qgis/models/token_model.py index 3c6baec..1998a34 100644 --- a/XYZHubConnector/xyz_qgis/models/token_model.py +++ b/XYZHubConnector/xyz_qgis/models/token_model.py @@ -10,14 +10,14 @@ import configparser -from typing import List, Mapping +from typing import List, Dict from qgis.PyQt.QtCore import QIdentityProxyModel, Qt, QVariant from qgis.PyQt.QtGui import QStandardItem, QStandardItemModel from ..network import datahub_servers -GroupedData = Mapping[str, List[Mapping]] +GroupedData = Dict[str, List[Dict]] class UsedToken: