From e61473fb7f002bc495938f0c22153303f83b8c59 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 18:21:37 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v6.0.0) - https://github.com/asottile/reorder_python_imports → https://github.com/asottile/reorder-python-imports - [github.com/asottile/reorder-python-imports: v3.9.0 → v3.15.0](https://github.com/asottile/reorder-python-imports/compare/v3.9.0...v3.15.0) - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v6.0.0) - [github.com/pre-commit/pygrep-hooks: v1.9.0 → v1.10.0](https://github.com/pre-commit/pygrep-hooks/compare/v1.9.0...v1.10.0) - [github.com/asottile/blacken-docs: v1.12.1 → 1.20.0](https://github.com/asottile/blacken-docs/compare/v1.12.1...1.20.0) - [github.com/psf/black: 22.12.0 → 25.1.0](https://github.com/psf/black/compare/22.12.0...25.1.0) - [github.com/PyCQA/flake8: 5.0.4 → 7.3.0](https://github.com/PyCQA/flake8/compare/5.0.4...7.3.0) - [github.com/PyCQA/doc8: v1.0.0 → v2.0.0](https://github.com/PyCQA/doc8/compare/v1.0.0...v2.0.0) - [github.com/mgedmin/check-manifest: 0.49 → 0.50](https://github.com/mgedmin/check-manifest/compare/0.49...0.50) - [github.com/PyCQA/doc8: v1.0.0 → v2.0.0](https://github.com/PyCQA/doc8/compare/v1.0.0...v2.0.0) - [github.com/asottile/setup-cfg-fmt: v2.2.0 → v2.8.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.2.0...v2.8.0) - [github.com/econchick/interrogate: 1.5.0 → 1.7.0](https://github.com/econchick/interrogate/compare/1.5.0...1.7.0) - [github.com/codespell-project/codespell: v2.2.2 → v2.4.1](https://github.com/codespell-project/codespell/compare/v2.2.2...v2.4.1) - [github.com/asottile/pyupgrade: v3.3.1 → v3.20.0](https://github.com/asottile/pyupgrade/compare/v3.3.1...v3.20.0) --- .pre-commit-config.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c215738..8f62665 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,17 +1,17 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: check-merge-conflict - id: debug-statements - id: end-of-file-fixer -- repo: https://github.com/asottile/reorder_python_imports - rev: v3.9.0 +- repo: https://github.com/asottile/reorder-python-imports + rev: v3.15.0 hooks: - id: reorder-python-imports types: [python] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: check-added-large-files args: ['--maxkb=100'] @@ -27,7 +27,7 @@ repos: args: [--branch, main] - id: trailing-whitespace - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.9.0 + rev: v1.10.0 hooks: - id: python-check-blanket-noqa - id: python-check-mock-methods @@ -39,18 +39,18 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/asottile/blacken-docs - rev: v1.12.1 + rev: 1.20.0 hooks: - id: blacken-docs additional_dependencies: [black==22.3.0] types: [rst] - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 25.1.0 hooks: - id: black language_version: python3.10 - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 7.3.0 hooks: - id: flake8 types: [python] @@ -71,7 +71,7 @@ repos: Pygments, ] - repo: https://github.com/PyCQA/doc8 - rev: v1.0.0 + rev: v2.0.0 hooks: - id: doc8 - repo: meta @@ -80,29 +80,29 @@ repos: - id: check-useless-excludes # - id: identity # Prints all files passed to pre-commits. Debugging. - repo: https://github.com/mgedmin/check-manifest - rev: "0.49" + rev: "0.50" hooks: - id: check-manifest - repo: https://github.com/PyCQA/doc8 - rev: v1.0.0 + rev: v2.0.0 hooks: - id: doc8 - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.2.0 + rev: v2.8.0 hooks: - id: setup-cfg-fmt - repo: https://github.com/econchick/interrogate - rev: 1.5.0 + rev: 1.7.0 hooks: - id: interrogate args: [-v, --fail-under=20] exclude: ^(tests|docs|setup\.py) - repo: https://github.com/codespell-project/codespell - rev: v2.2.2 + rev: v2.4.1 hooks: - id: codespell - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 + rev: v3.20.0 hooks: - id: pyupgrade args: [--py37-plus] From ae6df4ac32205418added84f87e3da1156c1faf6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 18:22:01 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- setup.cfg | 5 ++--- src/pybaum/equality.py | 1 + src/pybaum/tree_util.py | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 6edd072..5f7a973 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,11 +7,10 @@ url = https://github.com/OpenSourceEconomics/pybaum author = Janos Gabler, Tobias Raabe author_email = janos.gabler@gmail.com license = MIT -license_file = LICENSE +license_files = LICENSE platforms = unix, linux, osx, cygwin, win32 classifiers = Development Status :: 3 - Alpha - License :: OSI Approved :: MIT License Operating System :: MacOS :: MacOS X Operating System :: Microsoft :: Windows Operating System :: POSIX @@ -22,7 +21,7 @@ classifiers = [options] packages = find: -python_requires = >=3.7 +python_requires = >=3.9 include_package_data = True package_dir = =src diff --git a/src/pybaum/equality.py b/src/pybaum/equality.py index 9c36b3c..c5795dd 100644 --- a/src/pybaum/equality.py +++ b/src/pybaum/equality.py @@ -1,4 +1,5 @@ """Functions to check equality of pytree leaves.""" + from pybaum.config import IS_JAX_INSTALLED from pybaum.config import IS_NUMPY_INSTALLED from pybaum.config import IS_PANDAS_INSTALLED diff --git a/src/pybaum/tree_util.py b/src/pybaum/tree_util.py index 769fcfe..8e79c07 100644 --- a/src/pybaum/tree_util.py +++ b/src/pybaum/tree_util.py @@ -6,6 +6,7 @@ - The treedef containing information to unflatten pytrees is implemented differently. """ + from pybaum.equality import EQUALITY_CHECKERS from pybaum.registry import get_registry from pybaum.typecheck import get_type