From 7cda078d19674a43937da5ded68a0223c86592e7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 21:59:31 +0000 Subject: [PATCH 1/4] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.10 → v0.15.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.10...v0.15.9) - [github.com/psf/black-pre-commit-mirror: 25.12.0 → 26.3.1](https://github.com/psf/black-pre-commit-mirror/compare/25.12.0...26.3.1) - [github.com/python-jsonschema/check-jsonschema: 0.36.0 → 0.37.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.36.0...0.37.1) - [github.com/rhysd/actionlint: v1.7.10 → v1.7.12](https://github.com/rhysd/actionlint/compare/v1.7.10...v1.7.12) - [github.com/woodruffw/zizmor-pre-commit: v1.19.0 → v1.23.1](https://github.com/woodruffw/zizmor-pre-commit/compare/v1.19.0...v1.23.1) - [github.com/tox-dev/pyproject-fmt: v2.11.1 → v2.21.0](https://github.com/tox-dev/pyproject-fmt/compare/v2.11.1...v2.21.0) - [github.com/abravalheri/validate-pyproject: v0.24.1 → v0.25](https://github.com/abravalheri/validate-pyproject/compare/v0.24.1...v0.25) - [github.com/rbubley/mirrors-prettier: v3.7.4 → v3.8.1](https://github.com/rbubley/mirrors-prettier/compare/v3.7.4...v3.8.1) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d6ff68..a845975 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + rev: v0.15.9 hooks: - id: ruff-check args: [--exit-non-zero-on-fix] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.3.1 hooks: - id: black @@ -27,28 +27,28 @@ repos: exclude: \.github/ISSUE_TEMPLATE\.md|\.github/PULL_REQUEST_TEMPLATE\.md - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.36.0 + rev: 0.37.1 hooks: - id: check-github-workflows - id: check-renovate - repo: https://github.com/rhysd/actionlint - rev: v1.7.10 + rev: v1.7.12 hooks: - id: actionlint - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.19.0 + rev: v1.23.1 hooks: - id: zizmor - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.11.1 + rev: v2.21.0 hooks: - id: pyproject-fmt - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.24.1 + rev: v0.25 hooks: - id: validate-pyproject @@ -63,7 +63,7 @@ repos: - id: yamlfmt - repo: https://github.com/rbubley/mirrors-prettier - rev: v3.7.4 + rev: v3.8.1 hooks: - id: prettier args: [--prose-wrap=always, --print-width=88] From f988ffb0f55b151392a8a1814b21d1a8c54af10b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 22:00:59 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 39 ++++++++++++++++----------------------- tests/test_filesize.py | 1 + 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8edfe1e..96545a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,28 +40,21 @@ optional-dependencies.tests = [ "pytest", "pytest-cov", ] +urls."Issue tracker" = "https://github.com/python-humanize/humanize/issues" +urls."Release notes" = "https://github.com/python-humanize/humanize/releases" urls.Documentation = "https://humanize.readthedocs.io/" urls.Funding = "https://tidelift.com/subscription/pkg/pypi-humanize?utm_source=pypi-humanize&utm_medium=pypi" urls.Homepage = "https://github.com/python-humanize/humanize" -urls."Issue tracker" = "https://github.com/python-humanize/humanize/issues" -urls."Release notes" = "https://github.com/python-humanize/humanize/releases" urls.Source = "https://github.com/python-humanize/humanize" [tool.hatch] version.source = "vcs" - -[tool.hatch.build] -artifacts = [ "*.mo" ] - -[tool.hatch.build.hooks.vcs] -version-file = "src/humanize/_version.py" - -[tool.hatch.version.raw-options] -local_scheme = "no-local-version" +version.raw-options.local_scheme = "no-local-version" +build.artifacts = [ "*.mo" ] +build.hooks.vcs.version-file = "src/humanize/_version.py" [tool.ruff] fix = true - lint.select = [ "C4", # flake8-comprehensions "D", # pydocstyle @@ -103,21 +96,21 @@ lint.future-annotations = true [tool.pyproject-fmt] max_supported_python = "3.15" -[tool.pytest.ini_options] -addopts = "--color=yes" -filterwarnings = [ +[tool.mypy] +pretty = true +strict = true +show_error_codes = true + +[tool.pytest] +ini_options.addopts = "--color=yes" +ini_options.filterwarnings = [ "error", ] -testpaths = [ "tests" ] +ini_options.testpaths = [ "tests" ] -[tool.coverage.report] +[tool.coverage] # Regexes for lines to exclude from consideration -exclude_also = [ +report.exclude_also = [ # Don't complain if non-runnable code isn't run: "if __name__ == .__main__.:", ] - -[tool.mypy] -pretty = true -strict = true -show_error_codes = true diff --git a/tests/test_filesize.py b/tests/test_filesize.py index c3e7386..04774d9 100644 --- a/tests/test_filesize.py +++ b/tests/test_filesize.py @@ -1,6 +1,7 @@ #!/usr/bin/env python """Tests for filesize humanizing.""" + from __future__ import annotations import pytest From 18feba243f8da24ab4742b9ca7310480af8e56f4 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 11 Apr 2026 00:39:49 +0300 Subject: [PATCH 3/4] Update URL --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a845975..d6c446d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: hooks: - id: actionlint - - repo: https://github.com/woodruffw/zizmor-pre-commit + - repo: https://github.com/zizmorcore/zizmor-pre-commit rev: v1.23.1 hooks: - id: zizmor From 8abc07058d079072fabe66c3f363466e36e699e6 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 11 Apr 2026 00:42:10 +0300 Subject: [PATCH 4/4] Move pytest config to native pyproject.toml --- pyproject.toml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 96545a7..5cbff14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ classifiers = [ dynamic = [ "version" ] optional-dependencies.tests = [ "freezegun", - "pytest", + "pytest>=9", "pytest-cov", ] urls."Issue tracker" = "https://github.com/python-humanize/humanize/issues" @@ -102,11 +102,10 @@ strict = true show_error_codes = true [tool.pytest] -ini_options.addopts = "--color=yes" -ini_options.filterwarnings = [ - "error", -] -ini_options.testpaths = [ "tests" ] +minversion = "9.0" +addopts = [ "--color=yes" ] +testpaths = [ "tests" ] +filterwarnings = [ "error" ] [tool.coverage] # Regexes for lines to exclude from consideration