Skip to content

Proposal: Using Prek instead of pre-commit #1797

Closed

Description

@YazdanRa

Description

Prek is a re-engineered implementation of pre-commit in Rust. Which is faster and offers more features.

Now that it's been around for quite a while and Python, Django, Astral, etc. repos are using it, I think it's a good time to switch over.

Possible Solution

Prek has full parity with the usage of pre-commit in this repo, therefore, it will be a small change. If you're ok with this switch, I can send a small PR to switch over.

Additional context

No response

Related issues

No response

Activity

  1. YazdanRa commented on Jan 14, 2026

    @YazdanRa
    ContributorAuthor

    Benchmarks on commitizen repo:

    ➜  commitizen git:(feat/prek) ✗ hyperfine \       
        --prepare 'uv run prek clean && uv run pre-commit clean && uv cache clean' \
        --setup 'uv run prek --version && uv run pre-commit --version' \
        --runs 1 \
        'uv run prek install' \      
        'uv run pre-commit install'         
    Benchmark 1: uv run prek install
      Time (abs ≡):         76.9 ms               [User: 42.7 ms, System: 26.0 ms]
     
    Benchmark 2: uv run pre-commit install
      Time (abs ≡):        194.0 ms               [User: 125.0 ms, System: 57.3 ms]
     
    Summary
      uv run prek install ran
        2.52 times faster than uv run pre-commit install
    ➜  commitizen git:(feat/prek) ✗ hyperfine \
        --prepare 'uv run prek clean && uv run pre-commit clean && uv cache clean' \
        --setup 'uv run prek --version && uv run pre-commit --version' \
        --runs 1 \
        'uv run prek run --all-files' \      
        'uv run pre-commit run --all-files'
    Benchmark 1: uv run prek run --all-files
      Time (abs ≡):         6.206 s               [User: 9.190 s, System: 4.580 s]
     
    Benchmark 2: uv run pre-commit run --all-files
      Time (abs ≡):        18.040 s               [User: 13.598 s, System: 5.755 s]
     
    Summary
      uv run prek run --all-files ran
        2.91 times faster than uv run pre-commit run --all-files
  2. Lee-W commented on Jan 14, 2026

    @Lee-W
    Member

    I'm ok with it. Apache Airflow is also using it. I can take a look if there's a PR, but I'll most likely leave that open for a few days in case others have other thoughts

  3. bearomorphism commented on Jan 19, 2026

    @bearomorphism
    Collaborator

    Completed by #1799

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions