Skip to content

Commit

Permalink
Fix typos and update pre-commit hooks (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
btschwertfeger authored Feb 20, 2024
1 parent 445d2c4 commit 1d7e0b8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
17 changes: 12 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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$'
2 changes: 1 addition & 1 deletion cmethods/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down
2 changes: 1 addition & 1 deletion doc/src/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ dynamic = ["version"]
authors = [
{ name = "Benjamin Thomas Schwertfeger", email = "[email protected]" },
]
maintainers = [
{ name = "Benjamin Thomas Schwertfeger", email = "[email protected]" },
]
description = "Collection of bias correction procedures for single and multidimensional climate data"
readme = "README.md"
license = { file = "LICENSE" }
Expand Down Expand Up @@ -98,6 +101,8 @@ dev = [

examples = ["click", "matplotlib"]

[tool.codespell]
check-filenames = true

# ========= T Y P I N G ========================================================
#
Expand Down

0 comments on commit 1d7e0b8

Please sign in to comment.