diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bf2ea477..3330c2b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,7 +39,7 @@ repos: - id: seed-isort-config - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black language_version: python3 diff --git a/xmip/drift_removal.py b/xmip/drift_removal.py index a57f9acb..c1a919cd 100644 --- a/xmip/drift_removal.py +++ b/xmip/drift_removal.py @@ -364,9 +364,9 @@ def remove_trend(ds, ds_slope, variable, ref_date, check_mask=True): "`ds_slope` did not have information about the time over which the slope was calculated. Check the input." ) - detrended.attrs[ - "drift_removed" - ] = f"linear_trend_{cmip6_dataset_id(ds_slope)}_{trend_start}_{trend_stop}" + detrended.attrs["drift_removed"] = ( + f"linear_trend_{cmip6_dataset_id(ds_slope)}_{trend_start}_{trend_stop}" + ) return detrended diff --git a/xmip/postprocessing.py b/xmip/postprocessing.py index 36a8eaca..704d7476 100644 --- a/xmip/postprocessing.py +++ b/xmip/postprocessing.py @@ -595,9 +595,9 @@ def _parse_metric(ds, metric, dim_length_conflict="error"): metric_stripped = metric.reset_coords(drop=True) # add attributes - metric_stripped.attrs[ - "parsed_with" - ] = f"xmip/postprocessing/{inspect.currentframe().f_code.co_name}" + metric_stripped.attrs["parsed_with"] = ( + f"xmip/postprocessing/{inspect.currentframe().f_code.co_name}" + ) # TODO: Get the package and module name without hardcoding. ds = ds.assign_coords({metric_stripped.name: metric_stripped})