-
Notifications
You must be signed in to change notification settings - Fork 2.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
Replace Pyupgrade with Ruff rule #3795
Replace Pyupgrade with Ruff rule #3795
Conversation
@@ -182,7 +182,7 @@ def get_custom_labels( | |||
tex_labels = [ | |||
Integer( | |||
self.base, | |||
unit="^{%s}" % (f"{self.inverse_function(i):.{unit_decimal_places}f}"), | |||
unit="^{%s}" % (f"{self.inverse_function(i):.{unit_decimal_places}f}"), # noqa: UP031 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unit="^{%s}" % (f"{self.inverse_function(i):.{unit_decimal_places}f}"), # noqa: UP031 | |
unit="^{:.{prec}f}".format(self.inverse_function(i), prec=unit_decimal_places) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind of hard to understand, and also causes the tests to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say the original version is even more confusing. It was probably failing because of the missing f"
prefix
Co-authored-by: Victorien <[email protected]>
for more information, see https://pre-commit.ci
This reverts commit 48013f4.
This PR replaces the pre-commit hook
pyupgrade
with the respective rules in the ruff linter.