◐ Shell
clean mode source ↗

Contributing · gitpython-developers/GitPython · Discussion #1615

init-tests-after-clone.sh checks out master (not main) and then goes on to do some weird git reset --hard dance. What is that about? Do we even need the master branch still or should it be deleted?

That's an interesting observation, I wasn't quite aware that master was still used there. However, and despite confusing, I think it's for the better to use a stale branch for the state used in the test suite as it is stable (now, that we have main).

The init-tests-after-clone.sh was run, it should be OK to switch back to another branch. The resets are to create a ref-log history for the master branch, which hopefully is effective even if it's not checked out for the tests that care.

I am getting a lot of errors with mypy. Most of them are in git/ext/gitdb, but there are some elsewhere also. Is this expected?

I really don't know, I don't run python or the tests locally and really don't know what's going on, what should or shouldn't be with mypy. Some contributors wanted it, and now it's there, and probably ever changing.

When running black, it also formats code in submodules and causes a lot of changes. Should we exclude those directories?

I have never heard of the tool, but that means nothing. If black is the new way of doing things and tools-specific configuration would help, it could certainly be contributed.

This goes, of course, for all improvements that can be done to facilitate contributions or clean things up. I can understand that this isn't always possible, and in that case recommend creating a PR with the desired change and see what CI has to say about it.
Thanks for your understanding, I know for most questions I couldn't give an answer.