Python scanner (4.7.0.2747) detects unused local variables accumulated with operators like +=, but failed on variables accumulated with min()/max() (or may be other functions without side effects):
max_value = 0.0
avg_value = 0.0
for value_tag in value_tags:
value = get_value(value_tag) # arbitrary source of data
max_value = max(max_value, value)
avg_value += voltage