@@ -270,7 +270,7 @@ class Matcher(AbstractMatcher[MatchE]):
270
270
271
271
Examples::
272
272
273
- with RaisesGroups(Matcher(ValueError, match="string"))
273
+ with RaisesGroups(Matcher(ValueError, match="string")):
274
274
...
275
275
with RaisesGroups(Matcher(check=lambda x: x.args == (3, "hello"))):
276
276
...
@@ -326,7 +326,7 @@ def matches(
326
326
327
327
Examples::
328
328
329
- assert Matcher(ValueError).matches(my_exception):
329
+ assert Matcher(ValueError).matches(my_exception)
330
330
# is equivalent to
331
331
assert isinstance(my_exception, ValueError)
332
332
@@ -336,7 +336,7 @@ def matches(
336
336
assert Matcher(SyntaxError, match="foo").matches(excinfo.value.__cause__)
337
337
# above line is equivalent to
338
338
assert isinstance(excinfo.value.__cause__, SyntaxError)
339
- assert re.search("foo", str(excinfo.value.__cause__)
339
+ assert re.search("foo", str(excinfo.value.__cause__))
340
340
341
341
"""
342
342
if not self ._check_type (exception ):
@@ -549,7 +549,7 @@ def __init__(
549
549
)
550
550
self .allow_unwrapped = allow_unwrapped
551
551
self .flatten_subgroups : bool = flatten_subgroups
552
- self .is_baseexceptiongroup = False
552
+ self .is_baseexceptiongroup : bool = False
553
553
554
554
if allow_unwrapped and other_exceptions :
555
555
raise ValueError (
0 commit comments