Open
Description
Current problem
The following code:
def outer_definition():
i = 0
all_possible_cases = [1, 2, 3, "4"]
for case in all_possible_cases: # [consider-using-enumerate]
i += 1
print(i, case)
Can use enumerate to become the following:
def outer_definition():
all_possible_cases = [1, 2, 3, "4"]
for i, case in enumerate(all_possible_cases, start=1):
print(i, case)
Desired solution
Expand consider-using-enumerate
for this use case, or create a new message (right now consider-using-enumerate is well defined to target combination of len/range in iterator so changing it might bring false positive to a long lasting and battle tested check).