Skip to content

Commit aedfe2e

Browse files
Apply ruff/flake8-pytest-style rule PT031
PT031 `pytest.warns()` block should contain a single simple statement
1 parent 7a162bf commit aedfe2e

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

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
@@ -436,7 +436,7 @@ def test_tree() -> None:
436436
g3.create_group("baz")
437437
g5 = g3.create_group("qux")
438438
g5.create_array("baz", shape=(100,), chunks=(10,), dtype="float64")
439-
with pytest.warns(DeprecationWarning):
439+
with pytest.warns(DeprecationWarning): # noqa: PT031
440440
assert repr(zarr.tree(g1)) == repr(g1.tree())
441441
assert str(zarr.tree(g1)) == str(g1.tree())
442442

0 commit comments

Comments
 (0)