(self, *exc_info)
| 2280 | return super().__enter__() |
| 2281 | |
| 2282 | def __exit__(self, *exc_info): |
| 2283 | super().__exit__(*exc_info) |
| 2284 | for mod in self.modules: |
| 2285 | if hasattr(mod, '__warningregistry__'): |
| 2286 | mod.__warningregistry__.clear() |
| 2287 | if mod in self._warnreg_copies: |
| 2288 | mod.__warningregistry__.update(self._warnreg_copies[mod]) |
| 2289 | |
| 2290 | |
| 2291 | class suppress_warnings: |