hgvs icon indicating copy to clipboard operation
hgvs copied to clipboard

Ruff format whole source

Open davmlaw opened this issue 2 months ago • 3 comments

There is now a pre-commit to run ruff-format

But the source code isn't currently formatted

This means if you work on a file, it'll be auto-formatted and so any formatting changes get mixed up with functional changes, making code reviews much harder.

I think we should run format over the whole code base, so that the formatting change is done in a single commit

This commit can then be added to:

.git-blame-ignore-revs

Which will hide it from git blame and the GitHub UI (I think)

davmlaw avatar Oct 09 '25 05:10 davmlaw

I think this should be done by a trusted person (Reece?) and just comitted directly so long as the tests pass.

When I did it the change size is:

$ git diff --shortstat

 65 files changed, 1450 insertions(+), 638 deletions(-)

Which is probably too big to review in a PR

davmlaw avatar Oct 09 '25 05:10 davmlaw

I definitely agree with the direction.

Some of this will happen with #799 . However, I'm holding on that PR until we merge outstanding PRs.

If we reformat main with PRs outstanding, it's possible that we'll get conflicts at the site of their changes. I'd like to avoid that.

I'll take a stab at ordering our 2.0 milestone checklist (or creating a project for it) so that we can sync on the order of operations.

reece avatar Oct 14 '25 01:10 reece

My motivation for this is when I tried to make modifications to the pull request 792 it ran the auto-formatter and then caused me merge conflicts

davmlaw avatar Oct 16 '25 00:10 davmlaw