Skip to content

Commit 7539949

Browse files
authored
Merge pull request #138 from legend-exp/pre-commit-ci-update-config
chore: update pre-commit hooks
2 parents ab60ade + 47c7af3 commit 7539949

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ repos:
4040
]
4141

4242
- repo: https://github.com/astral-sh/ruff-pre-commit
43-
rev: "v0.8.6"
43+
rev: "v0.11.4"
4444
hooks:
4545
- id: ruff
4646
args: ["--fix", "--show-fixes"]
4747
- id: ruff-format
4848

4949
- repo: https://github.com/codespell-project/codespell
50-
rev: "v2.3.0"
50+
rev: "v2.4.1"
5151
hooks:
5252
- id: codespell
5353

@@ -72,12 +72,12 @@ repos:
7272
args: [--prose-wrap=always]
7373

7474
- repo: https://github.com/abravalheri/validate-pyproject
75-
rev: v0.23
75+
rev: v0.24.1
7676
hooks:
7777
- id: validate-pyproject
7878

7979
- repo: https://github.com/python-jsonschema/check-jsonschema
80-
rev: 0.30.0
80+
rev: 0.32.1
8181
hooks:
8282
- id: check-dependabot
8383
- id: check-github-workflows

docs/source/extensions/numbadoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ruff: noqa
1+
# ruff: noqa: ARG002 ARG003 PLW2901 RUF005
22

33
"""
44
This sphinx extension aims to improve the documentation of numba-decorated

src/lgdo/lh5/_serializers/read/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def build_field_mask(field_mask: Mapping[str, bool] | Collection[str]) -> defaul
3434
default = not field_mask[next(iter(field_mask.keys()))]
3535
return defaultdict(lambda: default, field_mask)
3636
if isinstance(field_mask, (list, tuple, set)):
37-
return defaultdict(bool, {field: True for field in field_mask})
37+
return defaultdict(bool, dict.fromkeys(field_mask, True))
3838
if isinstance(field_mask, defaultdict):
3939
return field_mask
4040
msg = "bad field_mask type"

src/lgdo/lh5/_serializers/read/vector_of_vectors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def _h5_read_vector_of_vectors(
123123
)
124124
msg = (
125125
f"cumulative_length non-increasing between entries "
126-
f"{start_row} and {start_row+n_rows_read}"
126+
f"{start_row} and {start_row + n_rows_read}"
127127
)
128128
raise LH5DecodeError(msg, fname, oname)
129129

src/lgdo/types/vectorofvectors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def __init__(
138138
# FIXME: have to copy the buffers, otherwise self will not own the
139139
# data and self.resize() will fail. Is it possible to avoid this?
140140
flattened_data = np.copy(
141-
container.pop(f"node{data.ndim-1}-data", np.empty(0, dtype=dtype))
141+
container.pop(f"node{data.ndim - 1}-data", np.empty(0, dtype=dtype))
142142
)
143143

144144
# if user-provided dtype is different than dtype from Awkward, cast

0 commit comments

Comments
 (0)