Should we generate simple/fast error messages? Return True if errors are not shown to user, i.e. errors are ignored or they are collected for internal use only. If True, we should prefer to generate a simple message quickly. All normal errors should still be reporte
(self)
| 987 | return file in self.error_info_map and file not in self.ignored_files |
| 988 | |
| 989 | def prefer_simple_messages(self) -> bool: |
| 990 | """Should we generate simple/fast error messages? |
| 991 | |
| 992 | Return True if errors are not shown to user, i.e. errors are ignored |
| 993 | or they are collected for internal use only. |
| 994 | |
| 995 | If True, we should prefer to generate a simple message quickly. |
| 996 | All normal errors should still be reported. |
| 997 | """ |
| 998 | if self.file in self.ignored_files: |
| 999 | # Errors ignored, so no point generating fancy messages |
| 1000 | return True |
| 1001 | if self.options.ignore_errors: |
| 1002 | return True |
| 1003 | if self._watchers: |
| 1004 | _watcher = self._watchers[-1] |
| 1005 | if _watcher._filter is True and _watcher._filtered is None: |
| 1006 | # Errors are filtered |
| 1007 | return True |
| 1008 | return False |
| 1009 | |
| 1010 | def raise_error(self, use_stdout: bool = True) -> NoReturn: |
| 1011 | """Raise a CompileError with the generated messages. |
no outgoing calls
no test coverage detected