From 04fbba7bdca45f6f6b9e63e6a0878a8651258d7b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 17:59:07 +0000 Subject: [PATCH 1/2] chore: update pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/codespell-project/codespell: v2.4.1 → v2.4.3](https://github.com/codespell-project/codespell/compare/v2.4.1...v2.4.3) - [github.com/pre-commit/mirrors-mypy: v1.19.1 → v2.3.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.19.1...v2.3.0) - [github.com/numpy/numpydoc: v1.10.0 → v1.11.0rc0](https://github.com/numpy/numpydoc/compare/v1.10.0...v1.11.0rc0) - [github.com/astral-sh/ruff-pre-commit: v0.15.4 → v0.16.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.4...v0.16.1) - [github.com/scientific-python/cookie: 2025.11.21 → 2026.06.18](https://github.com/scientific-python/cookie/compare/2025.11.21...2026.06.18) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a0f7a0eb..d68a42a8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,14 +53,14 @@ repos: types: [file, rst] - repo: https://github.com/codespell-project/codespell - rev: "v2.4.1" + rev: "v2.4.3" hooks: - id: codespell types_or: [asciidoc, python, markdown, rst] additional_dependencies: [tomli] - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.19.1' + rev: 'v2.3.0' hooks: - id: mypy additional_dependencies: @@ -68,13 +68,13 @@ repos: exclude: 'docs/|cf_units/_udunits2_parser/parser/.*\.py|cf_units/_udunits2_parser/_antlr4_runtime/.*\.py' - repo: https://github.com/numpy/numpydoc - rev: v1.10.0 + rev: v1.11.0rc0 hooks: - id: numpydoc-validation types: [file, python] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.15.4" + rev: "v0.16.1" hooks: # Run the linter - id: ruff-check @@ -90,7 +90,7 @@ repos: types: [file, python] - repo: https://github.com/scientific-python/cookie - rev: 2025.11.21 + rev: 2026.06.18 hooks: - id: sp-repo-review additional_dependencies: ["repo-review[cli]"] # TODO: Only neededed if extra dependencies are required From 555d32a4aa98ca854ef00582fd73e8c5c358d65f Mon Sep 17 00:00:00 2001 From: Henry <84939917+HGWright@users.noreply.github.com> Date: Wed, 19 Aug 2026 12:08:24 +0100 Subject: [PATCH 2/2] Pin stable numpydoc version and fix ruff failures (#687) * pin stable numpydoc version and fix ruff failures * add license to setup.py --- .pre-commit-config.yaml | 2 +- pyproject.toml | 4 ++++ setup.py | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d68a42a8..9449444d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,7 +68,7 @@ repos: exclude: 'docs/|cf_units/_udunits2_parser/parser/.*\.py|cf_units/_udunits2_parser/_antlr4_runtime/.*\.py' - repo: https://github.com/numpy/numpydoc - rev: v1.11.0rc0 + rev: v1.10.0 hooks: - id: numpydoc-validation types: [file, python] diff --git a/pyproject.toml b/pyproject.toml index e608e4cd..d49eeed8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -374,6 +374,7 @@ ignore = [ "PLC0414", # Import alias does not rename original package "PLR0912", # Too many branches "PLR0913", # too-many-argument + "PLR0917", # too-many-postional-arguments "PLR2004", # magic-value-comparison "PT006", # pytest-parametrize-names-wrong-type "PT011", # pytest-raises-too-broad @@ -406,6 +407,9 @@ select = [ "D212", # Multi-line docstring summary should start at the first line ] +[tool.ruff.lint.flake8-copyright] +notice-rgx = "(?i)copyright.*cf-units contributors" + [tool.ruff.lint.isort] force-sort-within-sections = true known-first-party = ["cf_units"] diff --git a/setup.py b/setup.py index b5da405a..13a9cad5 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,7 @@ +# Copyright cf-units contributors +# +# This file is part of cf-units and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Setup routines to enable cf-units' Cython elements. All other setup configuration is in `pyproject.toml`.