diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a1fb74fb..11c204d2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: rev: "1.19.1" hooks: - id: blacken-docs - additional_dependencies: [black==23.*] + additional_dependencies: [black==25.*] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 @@ -27,11 +27,9 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.12.11 hooks: - - id: ruff + - id: ruff-check args: ["--fix", "--show-fixes"] - types_or: [python, pyi, jupyter] - id: ruff-format - types_or: [python, pyi, jupyter] - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.17.1 @@ -39,7 +37,7 @@ repos: - id: mypy files: ^src args: [] - additional_dependencies: ["numpy~=2.2.0", "matplotlib>=3.4", "boost-histogram~=1.6.0", "uhi~=0.5.0", "pandas-stubs>=2.0.1.230501"] + additional_dependencies: ["numpy~=2.3.0", "matplotlib>=3.4", "boost-histogram~=1.6.1", "uhi~=1.0", "pandas-stubs>=2.0.1.230501"] - repo: https://github.com/codespell-project/codespell rev: v2.4.1 diff --git a/docs/user-guide/subclassing.rst b/docs/user-guide/subclassing.rst index 3de36686..3c1f4280 100644 --- a/docs/user-guide/subclassing.rst +++ b/docs/user-guide/subclassing.rst @@ -14,12 +14,10 @@ When you subclass, you will need to add a family. Any object can be used - the m import my_package - class Histogram(hist.Hist, family=my_package): - ... + class Histogram(hist.Hist, family=my_package): ... - class Regular(hist.axis.Regular, family=my_package): - ... + class Regular(hist.axis.Regular, family=my_package): ... If you only override ``Histogram``, you can leave off the ``family=`` argument, or set it to ``None``. It will generate a private ``object()`` in this case. You must add an explicit family to ``Histogram`` if you subclass any further components. diff --git a/pyproject.toml b/pyproject.toml index c4a26d7c..52606ffc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -216,7 +216,7 @@ extend-select = [ "UP", # pyupgrade "YTT", # flake8-2020 ] -ignore = ["PLR", "E501", "PT011", "PT013", "B017", "ISC001", "PLC0415"] +ignore = ["PLR", "E501", "PT011", "PT013", "B017", "PLC0415"] typing-modules = ["hist._compat.typing"] isort.required-imports = ["from __future__ import annotations"] flake8-unused-arguments.ignore-variadic-names = true