-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Summary
unnecessary-round (RUF057) has false positives with starred arguments. Example:
$ cat >ruf057.py <<'# EOF'
print(round(125, **{"ndigits": -2}))
print(round(125, *[-2]))
# EOF
$ python ruf057.py
100
100
$ ruff --isolated check ruf057.py --select RUF057 --fix
Found 2 errors (2 fixed, 0 remaining).
$ cat ruf057.py
print((125))
print((125))
$ python ruf057.py
125
125Version
ruff 0.14.3 (8737a2d 2025-10-30)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingruleImplementing or modifying a lint ruleImplementing or modifying a lint rule