MCPcopy
hub / github.com/python/mypy / filter_errors

Method filter_errors

mypy/messages.py:193–207  ·  view source on GitHub ↗
(
        self,
        *,
        filter_errors: bool | Callable[[str, ErrorInfo], bool] = True,
        save_filtered_errors: bool = False,
        filter_deprecated: bool = False,
        filter_revealed_type: bool = False,
    )

Source from the content-addressed store, hash-verified

191 #
192
193 def filter_errors(
194 self,
195 *,
196 filter_errors: bool | Callable[[str, ErrorInfo], bool] = True,
197 save_filtered_errors: bool = False,
198 filter_deprecated: bool = False,
199 filter_revealed_type: bool = False,
200 ) -> ErrorWatcher:
201 return ErrorWatcher(
202 self.errors,
203 filter_errors=filter_errors,
204 save_filtered_errors=save_filtered_errors,
205 filter_deprecated=filter_deprecated,
206 filter_revealed_type=filter_revealed_type,
207 )
208
209 def add_errors(self, errors: list[ErrorInfo]) -> None:
210 """Add errors in messages to this builder."""

Calls 1

ErrorWatcherClass · 0.90

Tested by

no test coverage detected