mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-09 00:08:52 -04:00
Fix typehint
This commit is contained in:
parent
154c7f0196
commit
00c7232f1c
@ -24,7 +24,8 @@
|
|||||||
"""
|
"""
|
||||||
from typing import (
|
from typing import (
|
||||||
Dict,
|
Dict,
|
||||||
Optional
|
Optional,
|
||||||
|
Any
|
||||||
)
|
)
|
||||||
|
|
||||||
from qgis.PyQt.QtCore import (pyqtSignal, QObject, QCoreApplication, QFile,
|
from qgis.PyQt.QtCore import (pyqtSignal, QObject, QCoreApplication, QFile,
|
||||||
@ -172,22 +173,22 @@ class Repositories(QObject):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
QObject.__init__(self)
|
QObject.__init__(self)
|
||||||
self.mRepositories: Dict[str, Dict[str]] = {}
|
self.mRepositories: Dict[str, Dict[str, Any]] = {}
|
||||||
self.httpId = {} # {httpId : repoName}
|
self.httpId = {} # {httpId : repoName}
|
||||||
self.mInspectionFilter: Optional[str] = None
|
self.mInspectionFilter: Optional[str] = None
|
||||||
|
|
||||||
def all(self) -> Dict[str, Dict[str]]:
|
def all(self) -> Dict[str, Dict[str, Any]]:
|
||||||
""" return dict of all repositories """
|
""" return dict of all repositories """
|
||||||
return self.mRepositories
|
return self.mRepositories
|
||||||
|
|
||||||
def allEnabled(self) -> Dict[str, Dict[str]]:
|
def allEnabled(self) -> Dict[str, Dict[str, Any]]:
|
||||||
""" return dict of all enabled and valid repositories """
|
""" return dict of all enabled and valid repositories """
|
||||||
if self.mInspectionFilter:
|
if self.mInspectionFilter:
|
||||||
return {self.mInspectionFilter: self.mRepositories[self.mInspectionFilter]}
|
return {self.mInspectionFilter: self.mRepositories[self.mInspectionFilter]}
|
||||||
|
|
||||||
return {k: v for k, v in self.mRepositories.items() if v['enabled'] and v['valid']}
|
return {k: v for k, v in self.mRepositories.items() if v['enabled'] and v['valid']}
|
||||||
|
|
||||||
def allUnavailable(self) -> Dict[str, Dict[str]]:
|
def allUnavailable(self) -> Dict[str, Dict[str, Any]]:
|
||||||
""" return dict of all unavailable repositories """
|
""" return dict of all unavailable repositories """
|
||||||
repos = {}
|
repos = {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user