Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: minff <[email protected]>
  • Loading branch information
minff committed Mar 12, 2024
1 parent 753cccc commit 9ef5cc9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
1 change: 0 additions & 1 deletion XYZHubConnector/xyz_qgis/layer/edit_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions XYZHubConnector/xyz_qgis/layer/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions XYZHubConnector/xyz_qgis/models/filter_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions XYZHubConnector/xyz_qgis/models/token_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion test/test_layer_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def _load_layer(self, loader, conn_info, meta, **kw_start):
timer.stop()
lst_layer.append(loader.layer)

# with self.assertRaises(AllErrorsDuringTest, msg="stopping loader should emit error") as cm:
# with self.assertRaises(
# AllErrorsDuringTest, msg="stopping loader should emit error") as cm:
# self._wait_async()
# lst_err = cm.exception.args[0]
# self.assertIsInstance(lst_err[0], ManualInterrupt)
Expand Down

0 comments on commit 9ef5cc9

Please sign in to comment.