Adjustment:
The rule must be ignored if the counter variable is modified inside the loop and does not just count the loops
Example
This is an example where the mentioned rule(s) would currently be suboptimal:
i = 0
for page in pagegenerators.YearPageGenerator(start, end, site):
self.assertIsInstance(page, pywikibot.Page)
self.assertEqual(date.formatYear(site.lang, start + i),
page.title())
self.assertNotEqual(page.title(), '0')
i += 1
if start + i == 0:
i += 1
Explanation
In the last line the counter variable i is adjusted. This is not the same as the value set by enumerate
Desired change
Example
This is an example where the mentioned rule(s) would currently be suboptimal:
Explanation
In the last line the counter variable
i
is adjusted. This is not the same as the value set byenumerate