Skip to content

Commit eabe283

Browse files
chore(deps): update pre-commit hooks (#1021)
* chore(deps): update pre-commit hooks updates: - [github.com/rbubley/mirrors-prettier: v3.5.3 → v3.6.2](rbubley/mirrors-prettier@v3.5.3...v3.6.2) - [github.com/astral-sh/ruff-pre-commit: v0.11.12 → v0.12.2](astral-sh/ruff-pre-commit@v0.11.12...v0.12.2) - [github.com/pre-commit/mirrors-mypy: v1.16.0 → v1.16.1](pre-commit/mirrors-mypy@v1.16.0...v1.16.1) - [github.com/pre-commit/mirrors-clang-format: v20.1.5 → v20.1.7](pre-commit/mirrors-clang-format@v20.1.5...v20.1.7) - [github.com/python-jsonschema/check-jsonschema: 0.33.0 → 0.33.2](python-jsonschema/check-jsonschema@0.33.0...0.33.2) * ci: remove 3.14 iOS builds Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * chore: address new lints Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent f6f0832 commit eabe283

File tree

6 files changed

+16
-10
lines changed

6 files changed

+16
-10
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ repos:
3030
additional_dependencies: [pyyaml]
3131

3232
- repo: https://github.com/rbubley/mirrors-prettier
33-
rev: "v3.5.3"
33+
rev: "v3.6.2"
3434
hooks:
3535
- id: prettier
3636
types_or: [yaml, markdown, html, css, scss, javascript, json]
3737

3838
- repo: https://github.com/astral-sh/ruff-pre-commit
39-
rev: "v0.11.12"
39+
rev: "v0.12.2"
4040
hooks:
4141
- id: ruff
4242
args: ["--fix", "--show-fixes"]
4343
- id: ruff-format
4444

4545
- repo: https://github.com/pre-commit/mirrors-mypy
46-
rev: v1.16.0
46+
rev: v1.16.1
4747
hooks:
4848
- id: mypy
4949
files: ^src
@@ -65,7 +65,7 @@ repos:
6565
exclude: .pre-commit-config.yaml
6666

6767
- repo: https://github.com/pre-commit/mirrors-clang-format
68-
rev: v20.1.5
68+
rev: v20.1.7
6969
hooks:
7070
- id: clang-format
7171
types_or: [c++]
@@ -78,7 +78,7 @@ repos:
7878
- id: rst-inline-touching-normal
7979

8080
- repo: https://github.com/python-jsonschema/check-jsonschema
81-
rev: 0.33.0
81+
rev: 0.33.2
8282
hooks:
8383
- id: check-readthedocs
8484
- id: check-github-workflows

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ build-frontend = "build[uv]"
182182
test-groups = ["test"]
183183
test-command = "python -m pytest -n auto --benchmark-disable tests"
184184
test-sources = ["pyproject.toml", "tests"]
185+
skip = [
186+
"cp314*-ios_*",
187+
]
185188
test-skip = [
186189
"cp3{9,10}-win_arm64",
187190
"cp3{9,10}-musllinux_*",

src/boost_histogram/axis/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ def bin(self, index: float) -> int | str | tuple[float, float]:
166166

167167
return self._ax.bin(index) # type: ignore[no-any-return]
168168

169+
__hash__ = None # type: ignore[assignment]
170+
169171
def __eq__(self, other: object) -> bool:
170172
return hasattr(other, "_ax") and self._ax == other._ax
171173

src/boost_histogram/histogram.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,8 @@ def __array__(
444444
kwargs["copy"] = copy
445445
return np.asarray(self.view(False), dtype=dtype, **kwargs) # type: ignore[call-overload]
446446

447+
__hash__ = None # type: ignore[assignment]
448+
447449
def __eq__(self, other: object) -> bool:
448450
return hasattr(other, "_hist") and self._hist == other._hist
449451

tests/test_histogram.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
from __future__ import annotations
22

3+
import copy
34
import functools
45
import operator
56
import pickle
67
import platform
78
import sys
9+
import threading
810
from collections import OrderedDict
911
from io import BytesIO
1012

@@ -47,7 +49,6 @@ def test_init():
4749

4850
def test_copy():
4951
a = bh.Histogram(bh.axis.Integer(-1, 1))
50-
import copy
5152

5253
b = copy.copy(a)
5354
assert a == b
@@ -1395,8 +1396,6 @@ def test_add_broadcast():
13951396

13961397
# Issue #431
13971398
def test_mul_shallow():
1398-
import threading
1399-
14001399
my_lock = threading.Lock()
14011400

14021401
h = bh.Histogram(bh.axis.Integer(0, 3, metadata=my_lock), metadata=my_lock)

tests/test_internal_histogram.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ def test_select_many():
120120
)
121121

122122
pick_a = hist[bh.loc("a"), ...]
123-
with pytest.warns(UserWarning):
123+
with pytest.warns(UserWarning, match="List indexing selection is experimental"):
124124
pick_b = pick_a[[bh.loc("x"), bh.loc("y")], ...]
125125

126-
with pytest.warns(UserWarning):
126+
with pytest.warns(UserWarning, match="List indexing selection is experimental"):
127127
pick = hist[bh.loc("a"), [bh.loc("x"), bh.loc("y")], ...]
128128

129129
assert pick_b.axes[0] == pick.axes[0]

0 commit comments

Comments
 (0)