Skip to content

Conversation

JasonGrace2282
Copy link
Member

This PR replaces the pre-commit hook pyupgrade with the respective rules in the ruff linter.

@JasonGrace2282 JasonGrace2282 requested a review from Viicos June 4, 2024 03:55
@JasonGrace2282 JasonGrace2282 marked this pull request as draft June 4, 2024 04:56
@JasonGrace2282 JasonGrace2282 marked this pull request as ready for review June 4, 2024 11:39
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)

Copy link
Member Author

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.

Copy link
Member

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

@JasonGrace2282 JasonGrace2282 merged commit e74f37e into ManimCommunity:main Jun 5, 2024
@JasonGrace2282 JasonGrace2282 deleted the ruff-pyupgrade branch June 5, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants