Skip to content

Commit 80d4f36

Browse files
Apply ruff/flake8-pytest-style rule PT031 (#3269)
PT031 `pytest.warns()` block should contain a single simple statement Co-authored-by: Davis Bennett <davis.v.bennett@gmail.com>
1 parent bc5ca27 commit 80d4f36

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ ignore = [
325325
"ANN401",
326326
"PT011", # TODO: apply this rule
327327
"PT030", # TODO: apply this rule
328-
"PT031", # TODO: apply this rule
329328
"RET505",
330329
"RET506",
331330
"RUF005",

tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def test_tree() -> None:
470470
g3.create_group("baz")
471471
g5 = g3.create_group("qux")
472472
g5.create_array("baz", shape=(100,), chunks=(10,), dtype="float64")
473-
with pytest.warns(DeprecationWarning):
473+
with pytest.warns(DeprecationWarning): # noqa: PT031
474474
assert repr(zarr.tree(g1)) == repr(g1.tree())
475475
assert str(zarr.tree(g1)) == str(g1.tree())
476476

0 commit comments

Comments
 (0)