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] 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