First of all thanks for this new B038 new rule, it's a great addition!
Using flake8-bugbear 24.1.15
The following code is flagged.
some_list = [1, 2, 3]
for elem in some_list:
print(elem)
if elem == 2:
found_idx = some_list.index(elem) # should not error
break
Although a method of some_list is called I believe this doesn't have any effect on the mutable