Skip to content

Commit 0f6c45d

Browse files
authored
Merge pull request #5394 from neutrinoceros/sty/ruf031
STY: enforce `RUF031` in pre-commit
2 parents 0e353e9 + ddb4346 commit 0f6c45d

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ repos:
4949
--fix,
5050
--show-fixes,
5151
]
52+
- id: ruff-check
53+
name: ruff-check (preview)
54+
args: [
55+
--preview,
56+
--fix,
57+
--show-fixes,
58+
--select,
59+
RUF031, # incorrectly-parenthesized-tuple-in-subscript
60+
]
5261

5362
- repo: https://github.com/pre-commit/pygrep-hooks
5463
rev: v1.10.0

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ select = [
303303
"UP", # pyupgrade
304304
"I", # isort
305305
"NPY", # numpy specific rules
306-
"RUF031"# incorrectly-parenthesized-tuple-in-subscript
307306
]
308307
ignore = [
309308
"E501", # line too long

yt/visualization/tests/test_offaxisprojection_pytestonly.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,5 +236,5 @@ def test_offaxisprojection_sph_defaultdepth(normal_vec, n_particles):
236236
p.render()
237237

238238
# get the number of circles in the plot
239-
cg = contour_generator(z=p.frb[("gas", "mass")].d)
239+
cg = contour_generator(z=p.frb["gas", "mass"].d)
240240
assert n_particles == len(cg.lines(1.0))

0 commit comments

Comments
 (0)