Skip to content

Commit

Permalink
chore: update pre-commit hooks (#364)
Browse files Browse the repository at this point in the history
* chore: update pre-commit hooks

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.278 → v0.0.280](astral-sh/ruff-pre-commit@v0.0.278...v0.0.280)

* style: pre-commit fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Jul 25, 2023
1 parent 7f6b660 commit b67ce58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.278"
rev: "v0.0.280"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand Down
10 changes: 5 additions & 5 deletions src/vector/backends/awkward.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ def _wrap_result(
and isinstance(returns[0], type)
and issubclass(returns[0], Azimuthal)
):
first = [x for x in result if isinstance(x, ak.Array)][0]
first = next(x for x in result if isinstance(x, ak.Array))
result = [
x if isinstance(x, ak.Array) else ak.broadcast_arrays(first, x)[1]
for x in result
Expand Down Expand Up @@ -699,7 +699,7 @@ def _wrap_result(
and issubclass(returns[0], Azimuthal)
and returns[1] is None
):
first = [x for x in result if isinstance(x, ak.Array)][0]
first = next(x for x in result if isinstance(x, ak.Array))
result = [
x if isinstance(x, ak.Array) else ak.broadcast_arrays(first, x)[1]
for x in result
Expand Down Expand Up @@ -746,7 +746,7 @@ def _wrap_result(
and isinstance(returns[1], type)
and issubclass(returns[1], Longitudinal)
):
first = [x for x in result if isinstance(x, ak.Array)][0]
first = next(x for x in result if isinstance(x, ak.Array))
result = [
x if isinstance(x, ak.Array) else ak.broadcast_arrays(first, x)[1]
for x in result
Expand Down Expand Up @@ -800,7 +800,7 @@ def _wrap_result(
and issubclass(returns[1], Longitudinal)
and returns[2] is None
):
first = [x for x in result if isinstance(x, ak.Array)][0]
first = next(x for x in result if isinstance(x, ak.Array))
result = [
x if isinstance(x, ak.Array) else ak.broadcast_arrays(first, x)[1]
for x in result
Expand Down Expand Up @@ -859,7 +859,7 @@ def _wrap_result(
and isinstance(returns[2], type)
and issubclass(returns[2], Temporal)
):
first = [x for x in result if isinstance(x, ak.Array)][0]
first = next(x for x in result if isinstance(x, ak.Array))
result = [
x if isinstance(x, ak.Array) else ak.broadcast_arrays(first, x)[1]
for x in result
Expand Down

0 comments on commit b67ce58

Please sign in to comment.