From b339e567d3463888561eb1285503f5ef9be7ae44 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Dec 2023 20:12:14 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- jord/qgis_utilities/configuration/project_settings.py | 1 - jord/qgis_utilities/numpy_utilities/conversion.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/jord/qgis_utilities/configuration/project_settings.py b/jord/qgis_utilities/configuration/project_settings.py index b73fe49..cd8bce5 100644 --- a/jord/qgis_utilities/configuration/project_settings.py +++ b/jord/qgis_utilities/configuration/project_settings.py @@ -28,7 +28,6 @@ def restore_default_project_settings(defaults={}, *, project_name=PROJECT_NAME): def store_project_setting(key, value, *, project_name=PROJECT_NAME): - if isinstance(value, bool): qgis_project.writeEntryBool(project_name, key, value) elif isinstance(value, float): diff --git a/jord/qgis_utilities/numpy_utilities/conversion.py b/jord/qgis_utilities/numpy_utilities/conversion.py index 710c50b..d87d6ca 100644 --- a/jord/qgis_utilities/numpy_utilities/conversion.py +++ b/jord/qgis_utilities/numpy_utilities/conversion.py @@ -5,7 +5,7 @@ __all__ = ["get_qimage_from_numpy"] -def get_qimage_from_numpy(img, debug=False)->QtGui.QImage: +def get_qimage_from_numpy(img, debug=False) -> QtGui.QImage: # if isinstance(img, Image): # img = img.data # if isinstance(img, numpy.ndarray): @@ -24,7 +24,7 @@ def get_qimage_from_numpy(img, debug=False)->QtGui.QImage: return QtGui.QImage(img, width, height, bytes_per_line, QtGui.QImage.Format_RGB888) -def transform_coordinates(coordinates, fromCRS, toCRS)->list: +def transform_coordinates(coordinates, fromCRS, toCRS) -> list: """ function to transform a set of coordinates from one CRS to another""" @@ -49,7 +49,7 @@ def transform_coordinates(coordinates, fromCRS, toCRS)->list: ] # transform the QgsPoint objects back to a list of coordinates -def get_coordinates_of_layer_extent(layer)->list: +def get_coordinates_of_layer_extent(layer) -> list: """ function to get coordinates of a layer extent