Cleanup string formatting.
This commit attempts to clean out old cruft, to make room for new cruft. This is clearly not the most pressing issue in the world, however I think it's far more legible.
This change consists of:
- Replacing most %-strings with f-strings.
- Cleanup a few areas where repeated string formatting logic was used, by using a loop instead.
All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.
I have read the CLA Document and I hereby sign the CLA
recheck
Read through the action result, and it looks like it wasn't happy about an extra line, and I forgot to wrap arguments for the SQLite call in the sample, so it did a different form of injection. Ironic. At least it failed fast?
- The
raisesyntax is invalid here. It should beraise ValueError(f"max. code point found: {ord(max(text))}, increase limit")without the colon afterValueError.raise ValueError:(f"max. code point found: {ord(max(text))}, increase limit")src/utils.py:1640
The syntax error is real, but I didn't introduce it. That's easy to fix though.
Everything copilot complained about, (Except the pass thing, which it was wrong about), I fixed. I don't think the dictionary thing makes a difference speed wise, but I think it's stylistically better.
@knotapun Would it be possible to squash your commits here?
They're now squashed into one commit. Git is my biggest weakness, sorry if this is not the appropriate way to do this.
Looks good to me, my "git-fu" is also pretty weak when it comes to this sort of thing!
As far as a I am concerned this PR is fine, but I think we need to spend some time double checking and testing that none of our tests are broken (which I doubt). So don't be surprised if it takes a few days :)