Skip to content

Fix pre commit config generation#57

Merged
TommasoTarchi merged 3 commits into
mainfrom
fix-pre-commit-config-generation
Jul 6, 2026
Merged

Fix pre commit config generation#57
TommasoTarchi merged 3 commits into
mainfrom
fix-pre-commit-config-generation

Conversation

@TommasoTarchi

Copy link
Copy Markdown
Contributor

CI on sync-test branch of python-project-template passes, and pre-commit-config.yml is generated.

I also changed "git add *" to "git add -A" in post_gen_project.py, as suggested by @thomasisensee .

@TommasoTarchi TommasoTarchi self-assigned this Jul 3, 2026
@TommasoTarchi TommasoTarchi linked an issue Jul 3, 2026 that may be closed by this pull request
@thomasisensee

Copy link
Copy Markdown
Member

The difference between the C++ cookiecutter and this one here is the following line:

conditional_remove(not {{ have_precommit }}, ".pre-commit-config.yaml")

This is only present in the Python cookiecutter. That is why the sync CI job on the C++ cookiecutter did create the .pre-commit-config.yaml. However, pre-commit was not run on the baked project since it is not installed. So I think explicitly installing it is a good idea.

Although ideally pre-commit should not find anything to complain about in the freshly baked project.

@TommasoTarchi TommasoTarchi merged commit c781b03 into main Jul 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No pre-commit config in the baked template repository

2 participants