Skip to content

pre-commit: remove extra line breaks when editing config#9

Open
baipaiha wants to merge 14 commits intofoarsitter:uv-generated-projectfrom
baipaiha:uv-fix-pre-commit-config
Open

pre-commit: remove extra line breaks when editing config#9
baipaiha wants to merge 14 commits intofoarsitter:uv-generated-projectfrom
baipaiha:uv-fix-pre-commit-config

Conversation

@baipaiha
Copy link
Copy Markdown

@baipaiha baipaiha commented Sep 2, 2025

Description

Avoid double \n when editing pre-commit config.

Related to cookiecutter#5434

Checklist:

  • I've made sure that tests are updated accordingly (especially if adding or updating a template option)
  • I've updated the documentation or confirm that my change doesn't require any updates

Rationale

The keepends=True was introduced in f206650

Currently, each calls to the function remove_repo_from_pre_commit_config() add a \n and the final pre-commit file ends up like:

repos:



  - repo: https://github.com/pre-commit/pre-commit-hooks



    rev: v6.0.0



    hooks:

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.

3 participants