STY: Use ruff instead of black for formatting
I've only taken a partial look, so not a full review, but from what I've seen this looks great.  Thanks @mroeschke!

(Merging quickly after you just rebased to avoid other PRs where ruff and black could potentially diverge.)