Fixes for #12360 Replacing percent format with f-strings
Reference issue
FIXES #12360
What does this implement/fix?
Replace percent format with format specifiers (f-strings)
Additional information
Used this command to capture percent format ruff check mne --config pyproject.toml --select UP031
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴
Thanks for your contribution, @hasrat17! There are numerous tests failing; this would need to be resolved before we can proceed here. Thanks!
Hey @hoechenberger, This is my first contribution to open source; sorry for asking this, but can you please correct me if I am wrong? So I need to run this command pytest -m "not ultraslowtest" mne and check whether everything is passing. And the test case here, which is failing like this one, Tests / ubuntu-latest / pip-pre / 3.11 (pull_request) in details shows an extensive file, how to track the error from there to resolve it.
Hello, I won't have time to assist you here, sorry. But I'm sure some of the other developers will chime in 👍
And updating this branch to latest main should fix the pip-pre failures
Hey @drammock @cbrnr can you please review and if everything good then merge this request.
The top of #12360 mentions:
Ruff rule UP031 can then be enabled in pyproject.toml.
can you try enabling it to see if it passes locally when you run pre-commit run --all ruff? If not you might need some # noqa: UP031 or similar on some lines if there are ones we want to keep as %-style.
Hey @larsoner, I Enabled the Ruff rule UP031 and ran this pre-commit run --all ruff few tests failed (screenshot). Then I added # noqa: UP031 in some lines, and all tests passed.
Then I added # noqa: UP031 in some lines, and all tests passed.
I think for at least the first two cases I looked at in 9ab9c76 an f-string would have been better than a # noqa line
Hey, @cbrnr @drammock @larsoner I have updated everything based on your suggestions. Can we merge this request?
🎉 Congrats on merging your first pull request! 🥳 Looking forward to seeing more from you in the future! 💪