Skip to content

Commit

Permalink
MAINT: apply refurb suggestion (#515)
Browse files Browse the repository at this point in the history
[FURB108]: Replace `x == y or x == z` with `x in (y, z)`
  • Loading branch information
DimitriPapadopoulos committed Nov 16, 2023
1 parent 4381a7f commit 13b0f81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions numpydoc/tests/test_docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,11 +851,11 @@ def test_see_also(prefix):

if func == "func_h":
assert role == "meth"
elif func == "baz.obj_q" or func == "~baz.obj_r":
elif func in ("baz.obj_q", "~baz.obj_r"):
assert role == "obj"
elif func == "class_j":
assert role == "class"
elif func in ["func_h1", "func_h2"]:
elif func in ("func_h1", "func_h2"):
assert role == "meth"
else:
assert role is None, str([func, role])
Expand All @@ -866,7 +866,7 @@ def test_see_also(prefix):
assert desc == ["some other func over", "multiple lines"]
elif func == "class_j":
assert desc == ["fubar", "foobar"]
elif func in ["func_f2", "func_g2", "func_h2", "func_j2"]:
elif func in ("func_f2", "func_g2", "func_h2", "func_j2"):
assert desc == ["description of multiple"], str(
[desc, ["description of multiple"]]
)
Expand Down

0 comments on commit 13b0f81

Please sign in to comment.