@@ -808,7 +808,7 @@ def raises( # noqa: F811
808
808
809
809
:param typing.Type[E] | typing.Tuple[typing.Type[E], ...] expected_exception:
810
810
The expected exception type, or a tuple if one of multiple possible
811
- exception types are excepted .
811
+ exception types are expected .
812
812
:kwparam str | typing.Pattern[str] | None match:
813
813
If specified, a string containing a regular expression,
814
814
or a regular expression object, that is tested against the string
@@ -924,10 +924,10 @@ def raises( # noqa: F811
924
924
f"any special code to say 'this should never raise an exception'."
925
925
)
926
926
if isinstance (expected_exception , type ):
927
- excepted_exceptions : Tuple [Type [E ], ...] = (expected_exception ,)
927
+ expected_exceptions : Tuple [Type [E ], ...] = (expected_exception ,)
928
928
else :
929
- excepted_exceptions = expected_exception
930
- for exc in excepted_exceptions :
929
+ expected_exceptions = expected_exception
930
+ for exc in expected_exceptions :
931
931
if not isinstance (exc , type ) or not issubclass (exc , BaseException ):
932
932
msg = "expected exception must be a BaseException type, not {}" # type: ignore[unreachable]
933
933
not_a = exc .__name__ if isinstance (exc , type ) else type (exc ).__name__
0 commit comments