From c2c410c1521a3b1eb3efef52f3b06c2e42f7b92b Mon Sep 17 00:00:00 2001 From: Charlie Tonneslan Date: Thu, 25 Jun 2026 16:38:22 -0400 Subject: [PATCH 01/11] Stop printing two minus signs in fractional for a negative mixed number (#320) Signed-off-by: Charlie Tonneslan --- src/humanize/number.py | 7 ++++++- tests/test_number.py | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/humanize/number.py b/src/humanize/number.py index f4dcb05d..1cbfc2b3 100644 --- a/src/humanize/number.py +++ b/src/humanize/number.py @@ -367,7 +367,12 @@ def fractional(value: NumberOrString) -> str: if not whole_number: return f"{numerator:.0f}/{denominator:.0f}" - return f"{whole_number:.0f} {numerator:.0f}/{denominator:.0f}" + # int() truncates toward zero, so for a negative number both + # whole_number and numerator carry the minus sign, which prints as + # "-1 -3/10". The sign already rides on the whole part; absorb it + # from the fractional part so the result reads as a normal mixed + # fraction. + return f"{whole_number:.0f} {abs(numerator):.0f}/{denominator:.0f}" def scientific(value: NumberOrString, precision: int = 2) -> str: diff --git a/tests/test_number.py b/tests/test_number.py index cb74fcf0..d8f9100a 100644 --- a/tests/test_number.py +++ b/tests/test_number.py @@ -183,6 +183,9 @@ def test_apnumber(test_input: int | str, expected: str) -> None: (-math.inf, "-Inf"), ("nan", "NaN"), ("-inf", "-Inf"), + (-1.3, "-1 3/10"), + (-2.5, "-2 1/2"), + (-0.5, "-1/2"), ], ) def test_fractional(test_input: float | str, expected: str) -> None: From 7574e0cc377d80db0d2756fc2c5e0b8799a6f8b4 Mon Sep 17 00:00:00 2001 From: Vincent Gao Date: Tue, 30 Jun 2026 17:34:12 +0200 Subject: [PATCH 02/11] Carry `metric()` to the next SI prefix when rounding reaches 1000 (#328) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- src/humanize/number.py | 12 ++++++++++-- tests/test_number.py | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/humanize/number.py b/src/humanize/number.py index 1cbfc2b3..9224a103 100644 --- a/src/humanize/number.py +++ b/src/humanize/number.py @@ -543,14 +543,22 @@ def metric(value: float, unit: str = "", precision: int = 3) -> str: if exponent >= 33 or exponent < -30: return scientific(value, precision - 1) + unit - value /= 10 ** (exponent // 3 * 3) + old_bucket = exponent // 3 * 3 + value /= 10**old_bucket + digits = int(max(0, precision - exponent % 3 - 1)) + if exponent < 30 and round(abs(value), digits) >= 1000: + exponent += 3 - exponent % 3 + new_bucket = exponent // 3 * 3 + value /= 10 ** (new_bucket - old_bucket) + digits = int(max(0, precision - exponent % 3 - 1)) + if exponent >= 3: ordinal_ = "kMGTPEZYRQ"[exponent // 3 - 1] elif exponent < 0: ordinal_ = "mμnpfazyrq"[(-exponent - 1) // 3] else: ordinal_ = "" - value_ = format(value, f".{int(max(0, precision - exponent % 3 - 1))}f") + value_ = format(value, f".{digits}f") if not (unit or ordinal_) or unit in ("°", "′", "″"): space = "" else: diff --git a/tests/test_number.py b/tests/test_number.py index d8f9100a..244dee0d 100644 --- a/tests/test_number.py +++ b/tests/test_number.py @@ -257,6 +257,10 @@ def test_clamp(test_args: list[typing.Any], expected: str) -> None: ([1234.56], "1.23 k"), ([12345, "", 6], "12.3450 k"), ([200_000], "200 k"), + ([999.9, "V"], "1.00 kV"), + ([999.99, "V"], "1.00 kV"), + ([999_999, "V"], "1.00 MV"), + ([0.0009999, "V"], "1.00 mV"), ([1e25, "m"], "10.0 Ym"), ([1e26, "m"], "100 Ym"), ([1e27, "A"], "1.00 RA"), From 823ad6096e1e5ba82ea876ce761fc2efebd76157 Mon Sep 17 00:00:00 2001 From: patchwright Date: Tue, 30 Jun 2026 17:36:42 +0200 Subject: [PATCH 03/11] Fix `naturalsize()` rounding rollover at unit boundaries (#329) --- src/humanize/filesize.py | 6 ++++++ tests/test_filesize.py | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/src/humanize/filesize.py b/src/humanize/filesize.py index c495fed3..315261aa 100644 --- a/src/humanize/filesize.py +++ b/src/humanize/filesize.py @@ -97,6 +97,12 @@ def naturalsize( return f"{int(bytes_)}B" if gnu else _("%d Bytes") % int(bytes_) exp = int(min(log(abs_bytes, base), len(suffix))) + # The suffix is chosen from the unrounded byte count, but `format` rounds the + # mantissa afterward; rounding can push it up to `base` (e.g. 999999 is + # 999.999 kB, which formats to "1000.0 kB"). When that happens and a larger + # suffix is available, step up one suffix so the result reads "1.0 MB". + if exp < len(suffix) and abs(float(format % (abs_bytes / (base**exp)))) >= base: + exp += 1 space = "" if gnu else " " ret: str = format % (bytes_ / (base**exp)) + space + _(suffix[exp - 1]) return ret diff --git a/tests/test_filesize.py b/tests/test_filesize.py index 04774d95..e6956399 100644 --- a/tests/test_filesize.py +++ b/tests/test_filesize.py @@ -82,6 +82,15 @@ ([1.123456789, False, True], "1B"), ([1.123456789 * 10**3, False, True], "1.1K"), ([1.123456789 * 10**6, False, True], "1.1M"), + # Rounding must not leave the mantissa at the base while a larger suffix + # is available: 999999 is 999.999 kB, which the "%.1f" format rounds to + # 1000.0 and must carry into 1.0 MB rather than render as "1000.0 kB". + ([999999], "1.0 MB"), + ([999999999], "1.0 GB"), + ([999999999999], "1.0 TB"), + ([1024**2 - 1, True], "1.0 MiB"), + ([1024**3 - 1, True], "1.0 GiB"), + ([1024**2 - 1, False, True], "1.0M"), ], ) def test_naturalsize(test_args: list[int] | list[int | bool], expected: str) -> None: From 8a47cb4a9c8e810c53e21c6ddc2f69ca52b22be2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 30 Jun 2026 19:00:36 +0300 Subject: [PATCH 04/11] Lazy imports for Python 3.15+ (#335) --- src/humanize/__init__.py | 9 +++++++++ src/humanize/filesize.py | 2 ++ src/humanize/number.py | 2 ++ src/humanize/time.py | 2 ++ 4 files changed, 15 insertions(+) diff --git a/src/humanize/__init__.py b/src/humanize/__init__.py index 6fb99593..4f54bc46 100644 --- a/src/humanize/__init__.py +++ b/src/humanize/__init__.py @@ -2,6 +2,15 @@ from __future__ import annotations +__lazy_modules__ = { + "humanize._version", + "humanize.filesize", + "humanize.i18n", + "humanize.lists", + "humanize.number", + "humanize.time", +} + from humanize.filesize import naturalsize from humanize.i18n import activate, deactivate, decimal_separator, thousands_separator from humanize.lists import natural_list diff --git a/src/humanize/filesize.py b/src/humanize/filesize.py index 315261aa..fb675fdc 100644 --- a/src/humanize/filesize.py +++ b/src/humanize/filesize.py @@ -2,6 +2,8 @@ from __future__ import annotations +__lazy_modules__ = {"humanize.i18n", "math"} + from math import log from humanize.i18n import _gettext as _ diff --git a/src/humanize/number.py b/src/humanize/number.py index 9224a103..2fb22c60 100644 --- a/src/humanize/number.py +++ b/src/humanize/number.py @@ -2,6 +2,8 @@ from __future__ import annotations +__lazy_modules__ = {"bisect"} + import bisect from .i18n import _gettext as _ diff --git a/src/humanize/time.py b/src/humanize/time.py index 8651a981..4a07d528 100644 --- a/src/humanize/time.py +++ b/src/humanize/time.py @@ -5,6 +5,8 @@ from __future__ import annotations +__lazy_modules__ = {"humanize.i18n", "humanize.number"} + from enum import Enum from functools import total_ordering From 52609bfec26cb38761a87cfd34c850e10c866051 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 30 Jun 2026 19:10:59 +0300 Subject: [PATCH 05/11] Drop experimental Python 3.13 free-threaded (#336) --- .github/workflows/labels.yml | 2 +- .github/workflows/require-pr-label.yml | 2 +- .github/workflows/test.yml | 1 - tox.ini | 6 ++++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index 85b60da5..cf4a0305 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -12,7 +12,7 @@ jobs: sync: permissions: pull-requests: write - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: diff --git a/.github/workflows/require-pr-label.yml b/.github/workflows/require-pr-label.yml index bd53a2a8..47bf92bb 100644 --- a/.github/workflows/require-pr-label.yml +++ b/.github/workflows/require-pr-label.yml @@ -6,7 +6,7 @@ on: jobs: label: - runs-on: ubuntu-latest + runs-on: ubuntu-slim permissions: issues: write diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ef093e7a..f941af87 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,6 @@ jobs: - "3.15" - "3.14t" - "3.14" - - "3.13t" - "3.13" - "3.12" - "3.11" diff --git a/tox.ini b/tox.ini index 58cbf670..1e50273c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,13 @@ [tox] requires = - tox>=4.2 + tox>=4.32 env_list = docs lint mypy - py{py3, 315, 314, 313, 312, 311, 310} + py{py3} + py{310-315} + py{314-315}t [testenv] extras = From 3c577d7650508d52aa2982e930b0e744c343082f Mon Sep 17 00:00:00 2001 From: WhySoSerio <118347763+BlocksecPHD@users.noreply.github.com> Date: Wed, 1 Jul 2026 00:12:53 +0800 Subject: [PATCH 06/11] Add test for exact googol (10**100) in `intword()` (#304) Co-authored-by: BlocksecPHD --- tests/test_number.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_number.py b/tests/test_number.py index 244dee0d..78639c32 100644 --- a/tests/test_number.py +++ b/tests/test_number.py @@ -122,6 +122,7 @@ def test_intword_powers() -> None: ([2e100], "2.0 googol"), ([None], "None"), (["1230000", "%0.2f"], "1.23 million"), + ([10**100], "1.0 googol"), ([10**101], "10.0 googol"), ([math.nan], "NaN"), ([math.inf], "+Inf"), From 0d0a80b2bce36a0c292140d0f697b13f7f0100c3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2026 08:42:30 +0300 Subject: [PATCH 07/11] Update github-actions (#338) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/benchmark.yml | 4 ++-- .github/workflows/docs.yml | 4 ++-- .github/workflows/labels.yml | 2 +- .github/workflows/lint.yml | 6 +++--- .github/workflows/release-drafter.yml | 4 ++-- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 6 +++--- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index ef63aede..e457b849 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -12,7 +12,7 @@ jobs: benchmarks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -34,7 +34,7 @@ jobs: run: pip install -e ".[tests]" - name: Run benchmarks - uses: CodSpeedHQ/action@3194d9a39c4d46684cb44bf7207fc56626aad8fd # v4.15.1 + uses: CodSpeedHQ/action@63f3e98b61959fe67f146a3ff022e4136fe9bb9c # v4.17.6 with: mode: simulation run: pytest tests/test_benchmarks.py --codspeed diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 42916938..2bd8afba 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -22,7 +22,7 @@ jobs: python-version: "3.x" - name: Install uv - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 - name: Docs run: | diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index cf4a0305..f81156db 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write runs-on: ubuntu-slim steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1041c722..d739b969 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - uses: j178/prek-action@bdca6f102f98e2b4c7029491a53dfd366469e33d # v2.0.4 @@ -22,13 +22,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: "3.x" - name: Install uv - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 - name: Mypy run: uvx --with tox-uv tox -e mypy diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 7e539aac..49292700 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-slim steps: # Drafts your next release notes as pull requests are merged into "main" - - uses: release-drafter/release-drafter@693d20e7c1ce1a81d3a41962f85914253b518449 # v7.3.1 + - uses: release-drafter/release-drafter@ed4bc48ec97379be2258e7b7ac2624a3e26ab809 # v7.4.0 autolabeler: if: | @@ -36,4 +36,4 @@ jobs: pull-requests: write runs-on: ubuntu-slim steps: - - uses: release-drafter/release-drafter/autolabeler@693d20e7c1ce1a81d3a41962f85914253b518449 # v7.3.1 + - uses: release-drafter/release-drafter/autolabeler@ed4bc48ec97379be2258e7b7ac2624a3e26ab809 # v7.4.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4595ff99..4d7a4e5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 persist-credentials: false diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f941af87..b3fe1ca9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,7 @@ jobs: os: [windows-latest, macos-latest, ubuntu-latest] steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -53,7 +53,7 @@ jobs: brew install gettext - name: Install uv - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 - name: Generate translation binaries run: | @@ -64,7 +64,7 @@ jobs: uvx --python ${{ matrix.python-version }} --with tox-uv tox -e py - name: Upload coverage - uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 with: flags: ${{ matrix.os }} name: ${{ matrix.os }} Python ${{ matrix.python-version }} From b3eec21282d0b6321e906e1a503ecbcbcba2dc00 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2026 08:46:42 +0300 Subject: [PATCH 08/11] Update dependency pymdown-extensions to v11 (#337) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 5c66848f..c8e211ca 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,4 +3,4 @@ mkdocs-include-markdown-plugin mkdocs-material mkdocstrings[python]==1.0.4 pygments -pymdown-extensions==10.21.3 +pymdown-extensions==11.0 From ea0b23172b0a7a3813e4a40a7547ee384a5f8320 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2026 09:11:31 +0300 Subject: [PATCH 09/11] Update actions/setup-python action to v6.3.0 (#340) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/benchmark.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e457b849..5a34f1da 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -17,7 +17,7 @@ jobs: persist-credentials: false - name: Set up Python 3.14 - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: "3.14" allow-prereleases: true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2bd8afba..60b86e19 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,7 +17,7 @@ jobs: persist-credentials: false - name: Set up Python - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: "3.x" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d739b969..36aed108 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: "3.x" - name: Install uv diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b3fe1ca9..6cb6e61f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true From 4c85c352664f6ed33b00b98e52c2232081ca943d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 08:18:45 +0300 Subject: [PATCH 10/11] Update CodSpeedHQ/action action to v4.18.1 (#341) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 5a34f1da..face7432 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -34,7 +34,7 @@ jobs: run: pip install -e ".[tests]" - name: Run benchmarks - uses: CodSpeedHQ/action@63f3e98b61959fe67f146a3ff022e4136fe9bb9c # v4.17.6 + uses: CodSpeedHQ/action@a4a36bb07c0638b0b4ca52bf1f3dad1b4289e52f # v4.18.1 with: mode: simulation run: pytest tests/test_benchmarks.py --codspeed From c3a124cdeb272d7f63bc0aa66f79c6fbafd2fc6d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 21:53:37 +0000 Subject: [PATCH 11/11] [pre-commit.ci] pre-commit autoupdate (#347) --- .pre-commit-config.yaml | 12 ++++++------ pyproject.toml | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d6c446df..77b243c3 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.15.9 + rev: v0.15.20 hooks: - id: ruff-check args: [--exit-non-zero-on-fix] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 26.3.1 + rev: 26.5.1 hooks: - id: black @@ -27,7 +27,7 @@ repos: exclude: \.github/ISSUE_TEMPLATE\.md|\.github/PULL_REQUEST_TEMPLATE\.md - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.37.1 + rev: 0.37.4 hooks: - id: check-github-workflows - id: check-renovate @@ -38,12 +38,12 @@ repos: - id: actionlint - repo: https://github.com/zizmorcore/zizmor-pre-commit - rev: v1.23.1 + rev: v1.26.1 hooks: - id: zizmor - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.21.0 + rev: v2.25.1 hooks: - id: pyproject-fmt @@ -63,7 +63,7 @@ repos: - id: yamlfmt - repo: https://github.com/rbubley/mirrors-prettier - rev: v3.8.1 + rev: v3.9.4 hooks: - id: prettier args: [--prose-wrap=always, --print-width=88] diff --git a/pyproject.toml b/pyproject.toml index b2777399..1843da19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,15 +100,15 @@ lint.future-annotations = true max_supported_python = "3.15" [tool.mypy] -pretty = true strict = true +pretty = true show_error_codes = true [tool.pytest] -minversion = "9.0" addopts = [ "--color=yes" ] -testpaths = [ "tests" ] filterwarnings = [ "error" ] +minversion = "9.0" +testpaths = [ "tests" ] [tool.coverage] # Regexes for lines to exclude from consideration