Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#332)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.12.1 → 24.1.1](psf/black@23.12.1...24.1.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] committed Jan 30, 2024
1 parent 708d51a commit 200432a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions xmip/drift_removal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions xmip/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 200432a

Please sign in to comment.