Closed
Description
fix_division_safe has a test to see if the statement contains division, which assumes a statement length of 3. There are a few divisions in our codebase where that's not the case. Here's a few examples:
p75 = data[len(data) * 3 / 4]
random.randint(0, 1000) * 1.0 / 1000
output["SUCCESS"] * 100 / output["TOTAL"]
float(fraction.numer) / fraction.denom * 1e-9
mount.bytes_free * mount.free_size / bytes_in_gb
self.total_count() * threshold / 100
Metadata
Metadata
Assignees
Labels
No labels