Skip to content

Commit 1d7e0b8

Browse files
authoredFeb 20, 2024··
Fix typos and update pre-commit hooks (#64)
1 parent 445d2c4 commit 1d7e0b8

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed
 

‎.pre-commit-config.yaml

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.1.13
3+
rev: v0.2.2
44
hooks:
55
- id: ruff
66
args:
@@ -21,13 +21,20 @@ repos:
2121
exclude: ^examples/|^tests/|^setup.py$
2222
args: ["--rcfile=pyproject.toml"]
2323
# - repo: https://github.com/pre-commit/mirrors-mypy # FIXME
24-
# rev: v1.7.1
24+
# rev: v1.8.0
2525
# hooks:
2626
# - id: mypy
2727
# name: mypy
2828
# args:
2929
# - --config-file=pyproject.toml
30-
# - cmethods
30+
# - --install-types
31+
# - --non-interactive
32+
- repo: https://github.com/codespell-project/codespell
33+
rev: v2.2.6
34+
hooks:
35+
- id: codespell
36+
additional_dependencies:
37+
- tomli
3138
- repo: https://github.com/pre-commit/pre-commit-hooks
3239
rev: v4.5.0
3340
hooks:
@@ -61,7 +68,7 @@ repos:
6168
- id: rst-directive-colons
6269
- id: text-unicode-replacement-char
6370
- repo: https://github.com/psf/black
64-
rev: 23.12.1
71+
rev: 24.2.0
6572
hooks:
6673
- id: black
6774
# - repo: https://github.com/adamchainz/blacken-docs
@@ -75,7 +82,7 @@ repos:
7582
- id: isort
7683
args: ["--profile=black"] # solves conflicts between black and isort
7784
- repo: https://github.com/pre-commit/mirrors-prettier
78-
rev: v3.1.0
85+
rev: v3.0.2
7986
hooks:
8087
- id: prettier
8188
exclude: '\.nc$|^tests/fixture/|\.ipynb$'

‎cmethods/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def ensure_dividable(
112112
:type numerator: np.ndarray
113113
:param denominator: Denominator that can be zero
114114
:type denominator: np.ndarray
115-
:return: Zero-ensured devision
115+
:return: Zero-ensured division
116116
:rtype: np.ndarray | float
117117
"""
118118
with np.errstate(divide="ignore", invalid="ignore"):

‎doc/src/getting_started.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ method specific documentation.
3030
simp = xr.open_dataset("input_data/scenario.nc")
3131
3232
ls_result = adjust(
33-
mathod="linear_scaling",
33+
method="linear_scaling",
3434
obs=obsh["tas"][:, 0, 0],
3535
simh=simh["tas"][:, 0, 0],
3636
simp=simp["tas"][:, 0, 0],

‎pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ dynamic = ["version"]
88
authors = [
99
{ name = "Benjamin Thomas Schwertfeger", email = "contact@b-schwertfeger.de" },
1010
]
11+
maintainers = [
12+
{ name = "Benjamin Thomas Schwertfeger", email = "contact@b-schwertfeger.de" },
13+
]
1114
description = "Collection of bias correction procedures for single and multidimensional climate data"
1215
readme = "README.md"
1316
license = { file = "LICENSE" }
@@ -98,6 +101,8 @@ dev = [
98101

99102
examples = ["click", "matplotlib"]
100103

104+
[tool.codespell]
105+
check-filenames = true
101106

102107
# ========= T Y P I N G ========================================================
103108
#

0 commit comments

Comments
 (0)
Please sign in to comment.