no-else-continue / R1724#
Unnecessary "%s" after "continue", %s
Used in order to highlight an unnecessary block of code following an if containing a continue statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a continue statement.
def even_number_under(n: int): for i in range(n): if i % 2 == 1: # [no-else-continue] continue else: yield i
def even_number_under(n: int): for i in range(n): if i % 2 == 1: continue yield i
Created by the refactoring checker.