Skip to content

Commit 7c4caf2

Browse files
committed
update comments
1 parent a5ea822 commit 7c4caf2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/enforce_match_arg_in_assert_produces_warning.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
the "match" argument. This will help ensure that users always see
55
the correct warning message.
66
7-
tm.assert_produces_warning(None) is excluded as no warning is
7+
tm.assert_produces_warning(None), tm.assert_produces_warning()
8+
and tm.assert_produces_warning(False) are excluded as no warning is
89
produced.
910
1011
"""
@@ -32,7 +33,8 @@ def visit_Call(self, node) -> None:
3233
# only check for attribute function of class/module tm
3334
if ( isinstance(node.func.value, ast.Name) and
3435
node.func.value.id == "tm" ):
35-
# ignore tm.assert_produces_warning(None)/tm.assert_produces_warning()
36+
# ignore tm.assert_produces_warning(None),tm.assert_produces_warning()
37+
# and tm.assert_produces_warning(False)
3638
if ( len(node.args) == 0 or
3739
(isinstance(node.args[0], ast.Constant) and
3840
( node.args[0].value is None or node.args[0].value is False))):

0 commit comments

Comments
 (0)