Clear the list of recorded warnings.
(self)
| 228 | raise AssertionError(f"{cls!r} not found in warning list") |
| 229 | |
| 230 | def clear(self) -> None: |
| 231 | """Clear the list of recorded warnings.""" |
| 232 | self._list[:] = [] |
| 233 | |
| 234 | # Type ignored because we basically want the `catch_warnings` generic type |
| 235 | # parameter to be ourselves but that is not possible(?). |