@@ -1235,7 +1235,7 @@ def note_call(self,
1235
1235
context , code = code )
1236
1236
1237
1237
def unreachable_statement (self , context : Context ) -> None :
1238
- self .fail ("Statement is unreachable" , context )
1238
+ self .fail ("Statement is unreachable" , context , code = codes . UNREACHABLE )
1239
1239
1240
1240
def redundant_left_operand (self , op_name : str , context : Context ) -> None :
1241
1241
"""Indicates that the left operand of a boolean expression is redundant:
@@ -1249,7 +1249,8 @@ def redundant_right_operand(self, op_name: str, context: Context) -> None:
1249
1249
it does not change the truth value of the entire condition as a whole.
1250
1250
'op_name' should either be the string "and" or the string "or".
1251
1251
"""
1252
- self .fail ("Right operand of '{}' is never evaluated" .format (op_name ), context )
1252
+ self .fail ("Right operand of '{}' is never evaluated" .format (op_name ),
1253
+ context , code = codes .UNREACHABLE )
1253
1254
1254
1255
def redundant_condition_in_comprehension (self , truthiness : bool , context : Context ) -> None :
1255
1256
self .redundant_expr ("If condition in comprehension" , truthiness , context )
@@ -1261,7 +1262,8 @@ def redundant_condition_in_assert(self, truthiness: bool, context: Context) -> N
1261
1262
self .redundant_expr ("Condition in assert" , truthiness , context )
1262
1263
1263
1264
def redundant_expr (self , description : str , truthiness : bool , context : Context ) -> None :
1264
- self .fail ("{} is always {}" .format (description , str (truthiness ).lower ()), context )
1265
+ self .fail ("{} is always {}" .format (description , str (truthiness ).lower ()),
1266
+ context , code = codes .UNREACHABLE )
1265
1267
1266
1268
def report_protocol_problems (self ,
1267
1269
subtype : Union [Instance , TupleType , TypedDictType ],
0 commit comments