Skip to content

Use prek in documentation and CI#2469

Merged
MichaReiser merged 5 commits intoastral-sh:mainfrom
MatthewMckee4:use-prek
Jan 12, 2026
Merged

Use prek in documentation and CI#2469
MichaReiser merged 5 commits intoastral-sh:mainfrom
MatthewMckee4:use-prek

Conversation

@MatthewMckee4
Copy link
Contributor

@MatthewMckee4 MatthewMckee4 commented Jan 12, 2026

Summary

prek now used in ruff, so nice if we could use it here too.

Added priority too.

> $ hyperfine --parameter-list branch main,use-prek \
--setup "git switch {branch}" \
--warmup 2  --runs 3 \
"prek run --all-files"
Benchmark 1: prek run --all-files (branch = main)
  Time (mean ± σ):      3.582 s ±  0.055 s    [User: 10.782 s, System: 1.475 s]
  Range (min … max):    3.541 s …  3.644 s    3 runs

Benchmark 2: prek run --all-files (branch = use-prek)
  Time (mean ± σ):      2.651 s ±  0.014 s    [User: 12.615 s, System: 1.714 s]
  Range (min … max):    2.638 s …  2.666 s    3 runs

Summary
  prek run --all-files (branch = use-prek) ran
    1.35 ± 0.02 times faster than prek run --all-files (branch = main)
> $ hyperfine 'prek run -a' 'pre-commit run --all-files' --runs 3 -i
Benchmark 1: prek run -a
  Time (mean ± σ):      2.680 s ±  0.047 s    [User: 12.638 s, System: 1.763 s]
  Range (min … max):    2.634 s …  2.729 s    3 runs

Benchmark 2: pre-commit run --all-files
  Time (mean ± σ):      4.522 s ±  0.103 s    [User: 13.003 s, System: 1.933 s]
  Range (min … max):    4.446 s …  4.639 s    3 runs

Summary
  prek run -a ran
    1.69 ± 0.05 times faster than pre-commit run --all-files

@MatthewMckee4 MatthewMckee4 marked this pull request as draft January 12, 2026 16:19
@MatthewMckee4 MatthewMckee4 marked this pull request as ready for review January 12, 2026 16:26
@MichaReiser MichaReiser added the internal An internal refactor or improvement label Jan 12, 2026
@MichaReiser
Copy link
Member

I don't have a strong preference which one it is. I use them rarely enough but I strongly agree that it should be the same everywhere (I'm too old to remember which tool to use in which repository)

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@MichaReiser MichaReiser merged commit 5264371 into astral-sh:main Jan 12, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants