From eb87a3ae69268af1892c47a2b530aeab68a8f6e6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 01:00:19 +0000 Subject: [PATCH] style(pre-commit.ci): auto fixes from pre-commit hooks --- docs/conf.py | 1 + pylandstats/__init__.py | 1 + pylandstats/multilandscape.py | 13 ++++++------- pylandstats/settings.py | 7 ++++--- pylandstats/spatiotemporal.py | 1 + 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 25524f0..de8f761 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,5 @@ """Docs config.""" + import os import sys diff --git a/pylandstats/__init__.py b/pylandstats/__init__.py index 8ac39cd..7eacd6e 100644 --- a/pylandstats/__init__.py +++ b/pylandstats/__init__.py @@ -1,4 +1,5 @@ """pylandstats init.""" + from .landscape import * from .spatiotemporal import * from .zonal import * diff --git a/pylandstats/multilandscape.py b/pylandstats/multilandscape.py index b02c1f6..123311a 100644 --- a/pylandstats/multilandscape.py +++ b/pylandstats/multilandscape.py @@ -1,4 +1,5 @@ """Multi-landscape analysis.""" + import abc import functools @@ -228,13 +229,11 @@ def compute_landscape_metrics_df( # noqa: D102 landscape_metrics_df.columns.name = "metric" for attribute_value, landscape in zip(attribute_values, self.landscapes): - landscape_metrics_df.loc[ - attribute_value, columns - ] = landscape.compute_landscape_metrics_df( - metrics=metrics, metrics_kws=metrics_kws - ).iloc[ - 0 - ] + landscape_metrics_df.loc[attribute_value, columns] = ( + landscape.compute_landscape_metrics_df( + metrics=metrics, metrics_kws=metrics_kws + ).iloc[0] + ) return landscape_metrics_df.apply(pd.to_numeric) diff --git a/pylandstats/settings.py b/pylandstats/settings.py index d458410..63f4ff6 100644 --- a/pylandstats/settings.py +++ b/pylandstats/settings.py @@ -1,4 +1,5 @@ """pylandstats settings.""" + from os import environ try: @@ -54,9 +55,9 @@ "euclidean_nearest_neighbor", ]: for suffix in ["mn", "am", "md", "ra", "sd", "cv"]: - fragstats_abbrev_dict[ - f"{metric}_{suffix}" - ] = f"{fragstats_abbrev_dict[metric]}_{suffix.upper()}" + fragstats_abbrev_dict[f"{metric}_{suffix}"] = ( + f"{fragstats_abbrev_dict[metric]}_{suffix.upper()}" + ) for suffix in ["mn", "am", "md", "ra", "sd", "cv"]: fragstats_abbrev_dict[f"disjunct_core_area_{suffix}"] = f"DCORE_{suffix}" diff --git a/pylandstats/spatiotemporal.py b/pylandstats/spatiotemporal.py index fe9ba97..2ba4704 100644 --- a/pylandstats/spatiotemporal.py +++ b/pylandstats/spatiotemporal.py @@ -1,4 +1,5 @@ """Spatio-temporal analysis.""" + import functools import geopandas as gpd