From d50d0d54cafc3990c79a633e819b99835f6b20b8 Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Tue, 20 Feb 2024 18:55:47 +0100 Subject: [PATCH] fix typos --- .pre-commit-config.yaml | 17 ++++++++++++----- cmethods/utils.py | 2 +- doc/src/getting_started.rst | 2 +- pyproject.toml | 5 +++++ 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a3c1ce5..17bc4d3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.13 + rev: v0.2.2 hooks: - id: ruff args: @@ -21,13 +21,20 @@ repos: exclude: ^examples/|^tests/|^setup.py$ args: ["--rcfile=pyproject.toml"] # - repo: https://github.com/pre-commit/mirrors-mypy # FIXME - # rev: v1.7.1 + # rev: v1.8.0 # hooks: # - id: mypy # name: mypy # args: # - --config-file=pyproject.toml - # - cmethods + # - --install-types + # - --non-interactive + - repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + additional_dependencies: + - tomli - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: @@ -61,7 +68,7 @@ repos: - id: rst-directive-colons - id: text-unicode-replacement-char - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.2.0 hooks: - id: black # - repo: https://github.com/adamchainz/blacken-docs @@ -75,7 +82,7 @@ repos: - id: isort args: ["--profile=black"] # solves conflicts between black and isort - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.1.0 + rev: v3.0.2 hooks: - id: prettier exclude: '\.nc$|^tests/fixture/|\.ipynb$' diff --git a/cmethods/utils.py b/cmethods/utils.py index e9a5f25..8d70063 100644 --- a/cmethods/utils.py +++ b/cmethods/utils.py @@ -112,7 +112,7 @@ def ensure_dividable( :type numerator: np.ndarray :param denominator: Denominator that can be zero :type denominator: np.ndarray - :return: Zero-ensured devision + :return: Zero-ensured division :rtype: np.ndarray | float """ with np.errstate(divide="ignore", invalid="ignore"): diff --git a/doc/src/getting_started.rst b/doc/src/getting_started.rst index b5dc5f7..8cc5cf4 100644 --- a/doc/src/getting_started.rst +++ b/doc/src/getting_started.rst @@ -30,7 +30,7 @@ method specific documentation. simp = xr.open_dataset("input_data/scenario.nc") ls_result = adjust( - mathod="linear_scaling", + method="linear_scaling", obs=obsh["tas"][:, 0, 0], simh=simh["tas"][:, 0, 0], simp=simp["tas"][:, 0, 0], diff --git a/pyproject.toml b/pyproject.toml index a2a365b..aaf253e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,9 @@ dynamic = ["version"] authors = [ { name = "Benjamin Thomas Schwertfeger", email = "contact@b-schwertfeger.de" }, ] +maintainers = [ + { name = "Benjamin Thomas Schwertfeger", email = "contact@b-schwertfeger.de" }, +] description = "Collection of bias correction procedures for single and multidimensional climate data" readme = "README.md" license = { file = "LICENSE" } @@ -98,6 +101,8 @@ dev = [ examples = ["click", "matplotlib"] +[tool.codespell] +check-filenames = true # ========= T Y P I N G ======================================================== #