Skip to content
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 UP031: Use F-string format specifiers instead of percent format #3322

Merged
merged 3 commits into from
Jun 2, 2024

Conversation

boxydog
Copy link
Contributor

@boxydog boxydog commented Jun 1, 2024

Related to: 3216

  • Ensured tests pass and (if applicable) updated functional test output
  • Conformed to code style guidelines by running appropriate linting tools

Note: these fixes are automatically applied by using ruff with --unsafe-fixes. I figured automatic is better.

From https://docs.astral.sh/ruff/rules/printf-string-formatting/:

"In cases where the format string contains a single generic format specifier (e.g. %s), and the right-hand side is an ambiguous expression, we cannot offer a safe fix."

Hopefully unit tests flush out errors, but there is risk here.

@justinmayer justinmayer changed the title ruff UP031: use format specifiers instead of percent format Ruff UP031: Use F-string format specifiers instead of percent format Jun 2, 2024
Copy link
Member

@justinmayer justinmayer left a comment

Choose a reason for hiding this comment

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

Thank you, @boxydog! 👍

@justinmayer justinmayer merged commit 657ad64 into getpelican:master Jun 2, 2024
15 checks passed
@boxydog boxydog deleted the more_ruff5 branch June 2, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants