-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ruff
] Unnecessary ndigits
argument to round()
(RUF057
)
#14828
base: main
Are you sure you want to change the base?
Conversation
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
RUF046 | 8 | 2 | 6 | 0 | 0 |
Thanks for following up on this! Would you mind splitting the PR into two if it isn't too much work:
Two separate PRs have the advantage that we can list the two changes separately in the changelog. It also makes it easier for me to review your PR |
@MichaReiser I would prefer not having to do that. |
Yeah, that's a bit annoying. However, I just skimmed over the changes, and there's too much going on in this PR, which makes it difficult for me and future readers to understand what it is about. That's why I have to insist that you split the PR. I suggest three PRs:
I'd suggest you start with one PR and then submit the next once that is merged. Or you can create stacked PRs, but they can be a bit painful when it comes to rebasing them. |
ruff
] Detect more strict-integer expressions and move round()
logic to new rule (RUF046
, RUF057
)ruff
] Unnecessary ndigits argument to round()
(RUF057
)
ruff
] Unnecessary ndigits argument to round()
(RUF057
)ruff
] Unnecessary ndigits
argument to round()
(RUF057
)
All done. I don't mind a little bit of rebasing, so stacked PRs it is. |
Thank you. Hmm. This is not the rule I expected. From our conversation in #14793 I'd expected a rule that detects unnecessary E.g. |
Summary
Resolves #14793.
Test Plan
cargo nextest run
andcargo insta test
.