Skip to content

Commit 4bb7688

Browse files
authored
Use correct type annotation for .filter_errors (#13486)
The same as ErrorWatcher constructor.
1 parent a50c9ff commit 4bb7688

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mypy/messages.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ def __init__(self, errors: Errors, modules: dict[str, MypyFile]) -> None:
162162
#
163163

164164
def filter_errors(
165-
self, *, filter_errors: bool = True, save_filtered_errors: bool = False
165+
self,
166+
*,
167+
filter_errors: bool | Callable[[str, ErrorInfo], bool] = True,
168+
save_filtered_errors: bool = False,
166169
) -> ErrorWatcher:
167170
return ErrorWatcher(
168171
self.errors, filter_errors=filter_errors, save_filtered_errors=save_filtered_errors

0 commit comments

Comments
 (0)