(self, *exc_info)
| 1993 | return super().__enter__() |
| 1994 | |
| 1995 | def __exit__(self, *exc_info): |
| 1996 | super().__exit__(*exc_info) |
| 1997 | for mod in self.modules: |
| 1998 | if hasattr(mod, '__warningregistry__'): |
| 1999 | mod.__warningregistry__.clear() |
| 2000 | if mod in self._warnreg_copies: |
| 2001 | mod.__warningregistry__.update(self._warnreg_copies[mod]) |
| 2002 | |
| 2003 | |
| 2004 | class suppress_warnings: |