Skip to content

Commit 47331d7

Browse files
[pre-commit.ci] pre-commit autoupdate (#403)
<!--pre-commit.ci start--> updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.1](astral-sh/ruff-pre-commit@v0.8.6...v0.9.1) <!--pre-commit.ci end--> --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent f3a7b11 commit 47331d7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ repos:
7474
# Python: Ruff linter & formatter
7575
# https://docs.astral.sh/ruff/
7676
- repo: https://github.com/astral-sh/ruff-pre-commit
77-
rev: v0.8.6
77+
rev: v0.9.1
7878
hooks:
7979
# Run the linter
8080
- id: ruff

src/amrex/extensions/MultiFab.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,15 +362,15 @@ def _process_index(self, index):
362362
index[i] = slice(start, stop, index[i].step)
363363
elif isinstance(index[i], tuple):
364364
# The slice includes ghosts
365-
assert (
366-
len(index[i]) == 0
367-
), "Indicator to include all ghost cells must be an empty tuple"
365+
assert len(index[i]) == 0, (
366+
"Indicator to include all ghost cells must be an empty tuple"
367+
)
368368
index[i] = slice(mins_with_ghost[i], maxs_with_ghost[i] + 1)
369369
else:
370370
ii = _handle_imaginary_negative_index(index[i], mins[i], maxs[i])
371-
assert (
372-
mins_with_ghost[i] <= ii and ii <= maxs_with_ghost[i]
373-
), "Index out of range"
371+
assert mins_with_ghost[i] <= ii and ii <= maxs_with_ghost[i], (
372+
"Index out of range"
373+
)
374374
index[i] = slice(ii, ii + 1)
375375

376376
return index

0 commit comments

Comments
 (0)