diff --git a/eotimeseriesviewer/externals/qps/__init__.py b/eotimeseriesviewer/externals/qps/__init__.py index dace95d704effecfa4ac43d724d2c9a655ad8f0a..224addf4527d43ed726ddf76ca98a74d086ae756 100644 --- a/eotimeseriesviewer/externals/qps/__init__.py +++ b/eotimeseriesviewer/externals/qps/__init__.py @@ -39,7 +39,7 @@ DIR_UI_FILES = DIR_QPS / 'ui' DIR_ICONS = DIR_UI_FILES / 'icons' QPS_RESOURCE_FILE = DIR_QPS / 'qpsresources_rc.py' -MAPLAYER_CONFIGWIDGET_FACTORIES = list() +MAPLAYER_CONFIGWIDGET_FACTORIES: typing.List[QgsMapLayerConfigWidgetFactory] = list() if Qgis.QGIS_VERSION < MIN_QGIS_VERSION: warnings.warn(f'Your QGIS ({Qgis.QGIS_VERSION}) is outdated. ' @@ -54,6 +54,7 @@ def registerMapLayerConfigWidgetFactory(factory: QgsMapLayerConfigWidgetFactory) :return: :rtype: """ + global MAPLAYER_CONFIGWIDGET_FACTORIES assert isinstance(factory, QgsMapLayerConfigWidgetFactory) if factory not in MAPLAYER_CONFIGWIDGET_FACTORIES: MAPLAYER_CONFIGWIDGET_FACTORIES.append(factory) @@ -68,6 +69,7 @@ def unregisterMapLayerConfigWidgetFactory(factory: QgsMapLayerConfigWidgetFactor :rtype: """ assert isinstance(factory, QgsMapLayerConfigWidgetFactory) + global MAPLAYER_CONFIGWIDGET_FACTORIES while factory in MAPLAYER_CONFIGWIDGET_FACTORIES: MAPLAYER_CONFIGWIDGET_FACTORIES.remove(factory) @@ -78,6 +80,7 @@ def mapLayerConfigWidgetFactories() -> typing.List[QgsMapLayerConfigWidgetFactor :return: list of QgsMapLayerConfigWidgetFactories :rtype: """ + global MAPLAYER_CONFIGWIDGET_FACTORIES return MAPLAYER_CONFIGWIDGET_FACTORIES[:] diff --git a/scripts/create_plugin.py b/scripts/create_plugin.py index 202c239ea18bbf1e9db5711ca8a040aff38c14bc..e509e3af4a1f79fb3f15597a1c5945f33c581061 100644 --- a/scripts/create_plugin.py +++ b/scripts/create_plugin.py @@ -134,7 +134,7 @@ def create_plugin(include_testdata: bool = False, compileEOTSVResourceFiles() # copy python and other resource files - pattern = re.compile(r'\.(py|svg|png|txt|ui|tif|qml|md|js|css)$') + pattern = re.compile(r'\.(py|svg|png|txt|ui|tif|qml|md|js|css|json)$') files = list(scantree(DIR_REPO / 'eotimeseriesviewer', pattern=pattern)) # add unit tests files.extend(list(scantree(DIR_REPO / 'tests', pattern=re.compile(r'\.py$'))))