unnecessary-round (RUF057)
Added in 0.12.0 · Related issues · View source
Fix is always available.
What it does
Checks for round() calls that have no effect on the input.
Why is this bad?
Rounding a value that's already an integer is unnecessary. It's clearer to use the value directly.
Example
Use instead:
Fix safety
The fix is marked unsafe if it is not possible to guarantee that the first argument of
round() is of type int, or if the fix deletes comments.