Skip to content

Conversation

StanFromIreland
Copy link
Member

@StanFromIreland StanFromIreland commented Sep 12, 2025

CC @zware The downside of adding the hook is we still have to deal with all of the little savings.

This currently uses the recommendations from their README.


📚 Documentation preview 📚: https://cpython-previews--138849.org.readthedocs.build/

@zware
Copy link
Member

zware commented Sep 12, 2025

The downside of adding the hook is we still have to deal with all of the little savings.

IIUC, the pre-commit hook should only apply when the file is changed?

@StanFromIreland
Copy link
Member Author

StanFromIreland commented Sep 12, 2025

As you can see on this PR, running pre-commit [with --all-files as is done in our CI] will modify all existing files too, I don't know if there's a nice way to do it, other than listing every existing file.

@StanFromIreland
Copy link
Member Author

As for git size:

$ git count-objects -v
count: 0
size: 0
in-pack: 1148637
packs: 1
size-pack: 339708
prune-packable: 0
garbage: 0
size-garbage: 0
$ git fetch upstream pull/138849/head:pr-138849
From https://github.com/python/cpython
 * [new ref]                 refs/pull/138849/head -> pr-138849
$ git count-objects -v
count: 0
size: 0
in-pack: 1148637
packs: 1
size-pack: 339708
prune-packable: 0
garbage: 0
size-garbage: 0

@hugovk
Copy link
Member

hugovk commented Sep 14, 2025

I think you'll need exclude them:

That way added files will be checked later.

@ned-deily
Copy link
Member

FYI, the Using/mac-installer* files will be being updated shortly so please don't modify them now.

@StanFromIreland
Copy link
Member Author

Oops, I messed up a merge.

@StanFromIreland StanFromIreland deleted the as-pre-commit branch September 17, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants