Skip to content

Commit

Permalink
Use correct type annotation for .filter_errors (#13486)
Browse files Browse the repository at this point in the history
The same as ErrorWatcher constructor.
  • Loading branch information
sobolevn authored Aug 23, 2022
1 parent a50c9ff commit 4bb7688
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mypy/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ def __init__(self, errors: Errors, modules: dict[str, MypyFile]) -> None:
#

def filter_errors(
self, *, filter_errors: bool = True, save_filtered_errors: bool = False
self,
*,
filter_errors: bool | Callable[[str, ErrorInfo], bool] = True,
save_filtered_errors: bool = False,
) -> ErrorWatcher:
return ErrorWatcher(
self.errors, filter_errors=filter_errors, save_filtered_errors=save_filtered_errors
Expand Down

0 comments on commit 4bb7688

Please sign in to comment.