doc: add versionadded to `ExceptionInfo.group_contains` (#12141)

This commit is contained in:
Sebastian Meyer 2024-03-19 23:54:26 +01:00 committed by GitHub
parent 532782a228
commit e7bf216516
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -786,6 +786,8 @@ class ExceptionInfo(Generic[E]):
If `None`, will search for a matching exception at any nesting depth.
If >= 1, will only match an exception if it's at the specified depth (depth = 1 being
the exceptions contained within the topmost exception group).
.. versionadded:: 8.0
"""
msg = "Captured exception is not an instance of `BaseExceptionGroup`"
assert isinstance(self.value, BaseExceptionGroup), msg