@@ -222,8 +222,8 @@ def filtered_errors(self) -> list[ErrorInfo]:
222222
223223class LoopErrorWatcher (ErrorWatcher ):
224224 """Error watcher that filters and separately collects `unreachable` errors,
225- `redundant-expr` errors, and revealed types when analysing loops iteratively
226- to help avoid making too-hasty reports."""
225+ `redundant-expr` and `redundant-casts` errors, and revealed types when analysing
226+ loops iteratively to help avoid making too-hasty reports."""
227227
228228 # Meaning of the tuple items: ErrorCode, message, line, column, end_line, end_column:
229229 uselessness_errors : set [tuple [ErrorCode , str , int , int , int , int ]]
@@ -254,7 +254,7 @@ def __init__(
254254
255255 def on_error (self , file : str , info : ErrorInfo ) -> bool :
256256
257- if info .code in (codes .UNREACHABLE , codes .REDUNDANT_EXPR ):
257+ if info .code in (codes .UNREACHABLE , codes .REDUNDANT_EXPR , codes . REDUNDANT_CAST ):
258258 self .uselessness_errors .add (
259259 (info .code , info .message , info .line , info .column , info .end_line , info .end_column )
260260 )
0 commit comments