Skip to content

Commit 83535ce

Browse files
committed
fix type hint
1 parent 6df19b4 commit 83535ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_pytest/recwarn.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def __init__(
284284

285285
def matches(self, warning: warnings.WarningMessage) -> bool:
286286
assert self.expected_warning is not None
287-
return issubclass(warning.category, self.expected_warning) and (
287+
return issubclass(warning.category, self.expected_warning) and bool(
288288
self.match_expr is None or re.search(self.match_expr, str(warning.message))
289289
)
290290

0 commit comments

Comments
 (0)