Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update pre-commit hooks #3172

Merged
merged 4 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
additional_dependencies: [pyyaml]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
rev: v0.5.5
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand Down Expand Up @@ -62,13 +62,13 @@ repos:
files: ^tests/

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.6
rev: 0.29.1
hooks:
- id: check-github-workflows
args: ["--verbose"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.11.0
hooks:
- id: mypy
files: src
Expand Down
2 changes: 0 additions & 2 deletions tests-cuda/test_1381_check_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
def test():
v2_array = ak.Array([1, 2, 3, 4, 5]).layout

stream = cp.cuda.Stream(non_blocking=True)

v2_array_cuda = ak.to_backend(v2_array, "cuda")
with cp.cuda.Stream() as stream:
v2_array_cuda[10,]
Expand Down
13 changes: 7 additions & 6 deletions tests-cuda/test_2922a_new_cuda_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import cupy as cp
import numpy as np
import pytest
from numpy.exceptions import AxisError

import awkward as ak
from awkward.forms import (
Expand Down Expand Up @@ -269,7 +270,7 @@ def test_1904_drop_none_all_axes():
assert (
ak.is_none(array, axis=-2).tolist() == ak.is_none(cuda_array, axis=-2).tolist()
)
with pytest.raises(np.AxisError):
with pytest.raises(AxisError):
ak.drop_none(array, axis=-2).tolist()
ak.drop_none(cuda_array, axis=-2).tolist()

Expand All @@ -289,7 +290,7 @@ def test_1904_drop_none_all_axes():
ak.is_none(array2, axis=-2).tolist()
== ak.is_none(cuda_array2, axis=-2).tolist()
)
with pytest.raises(np.AxisError):
with pytest.raises(AxisError):
ak.drop_none(array2, axis=-2).tolist()
ak.drop_none(cuda_array2, axis=-2).tolist()

Expand All @@ -314,7 +315,7 @@ def test_1914_improved_axis_to_posaxis_is_none():

assert ak.is_none(array, axis=2).tolist() == ak.is_none(cuda_array, axis=2).tolist()

with pytest.raises(np.AxisError):
with pytest.raises(AxisError):
ak.is_none(array, axis=3)
ak.is_none(cuda_array, axis=3)

Expand All @@ -326,7 +327,7 @@ def test_1914_improved_axis_to_posaxis_is_none():
ak.is_none(array, axis=-2).tolist() == ak.is_none(cuda_array, axis=-2).tolist()
)

with pytest.raises(np.AxisError):
with pytest.raises(AxisError):
ak.is_none(array, axis=-3)
ak.is_none(cuda_array, axis=-3)

Expand Down Expand Up @@ -360,7 +361,7 @@ def test_1914_improved_axis_to_posaxis_singletons():
== ak.singletons(cuda_array, axis=2).tolist()
)

with pytest.raises(np.AxisError):
with pytest.raises(AxisError):
ak.singletons(array, axis=3)
ak.singletons(cuda_array, axis=3)

Expand All @@ -374,7 +375,7 @@ def test_1914_improved_axis_to_posaxis_singletons():
== ak.singletons(cuda_array, axis=-2).tolist()
)

with pytest.raises(np.AxisError):
with pytest.raises(AxisError):
ak.singletons(array, axis=-3)
ak.singletons(cuda_array, axis=-3)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_2179_parameter_merging_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ def test_merge_permutations():
def test_merge_type_commutativity():
one = ak.concatenate((ak.with_parameter([1], "k", "v"), [None]))
two = ak.concatenate(([None], ak.with_parameter([1], "k", "v")))
assert type(one) == type(two)
assert type(one) is type(two)
Loading