Skip to content

prek 0.2.30+ autoupdate doesn't quote floats in rev #1935

@RazerM

Description

@RazerM

Summary

prek autoupdate will update e.g. 2026.1.2 to 2026.4 instead of '2026.4'.

I know prek works with floats but I would like to maintain pre-commit compatibility.

Willing to submit a PR?

  • Yes — I’m willing to open a PR to fix this.

Platform

macOS 26

Version

0.3.8

.pre-commit-config.yaml

The pre-commit hook to which this applies isn't public, but this is a public example I found (v0.19 -> 0.51):

repos:
  - repo: https://github.com/mgedmin/check-manifest
    rev: v0.19
    hooks:
      - id: check-manifest

Log file

2026-04-13T09:26:09.685755Z DEBUG prek: 0.3.8 (bb412c080 2026-03-23)
2026-04-13T09:26:09.686348Z DEBUG Args: ["prek", "auto-update"]
2026-04-13T09:26:09.698859Z TRACE get_root: close time.busy=12.4ms time.idle=1.29µs
2026-04-13T09:26:09.699241Z DEBUG Git root: /Users/.../projects/redacted
2026-04-13T09:26:09.699390Z DEBUG Found workspace root at `/Users/.../projects/redacted`
2026-04-13T09:26:09.699498Z DEBUG discover{root="/Users/.../projects/redacted" config=None refresh=true}: Performing fresh workspace discovery
2026-04-13T09:26:09.699535Z TRACE discover{root="/Users/.../projects/redacted" config=None refresh=true}:list_submodules{git_root="/Users/.../projects/redacted"}: close time.busy=2.67µs time.idle=458ns
2026-04-13T09:26:09.702681Z DEBUG Loading project configuration path=.pre-commit-config.yaml
2026-04-13T09:26:09.707438Z TRACE discover{root="/Users/.../projects/redacted" config=None refresh=true}: close time.busy=7.94ms time.idle=541ns
2026-04-13T09:26:09.708126Z TRACE Cloning repository `https://github.com/mgedmin/check-manifest` to `/var/folders/_p/1cq1n46912n0_4fhfh1l3fkx_r5kw6/T/.tmpPxdPvH`
2026-04-13T09:26:09.708175Z TRACE Executing `/Users/.../homebrew/bin/git -c init.defaultObjectFormat= init --template= /var/folders/_p/1cq1n46912n0_4fhfh1l3fkx_r5kw6/T/.tmpPxdPvH`
2026-04-13T09:26:09.727491Z TRACE Executing `cd /var/folders/_p/1cq1n46912n0_4fhfh1l3fkx_r5kw6/T/.tmpPxdPvH && /Users/.../homebrew/bin/git remote add origin https://github.com/mgedmin/check-manifest`
2026-04-13T09:26:09.736586Z TRACE Executing `cd /var/folders/_p/1cq1n46912n0_4fhfh1l3fkx_r5kw6/T/.tmpPxdPvH && /Users/.../homebrew/bin/git config extensions.partialClone true`
2026-04-13T09:26:09.743869Z TRACE Executing `cd /var/folders/_p/1cq1n46912n0_4fhfh1l3fkx_r5kw6/T/.tmpPxdPvH && /Users/.../homebrew/bin/git fetch origin HEAD --quiet --filter=blob:none --tags`
2026-04-13T09:26:10.533660Z TRACE Executing `cd /var/folders/_p/1cq1n46912n0_4fhfh1l3fkx_r5kw6/T/.tmpPxdPvH && /Users/.../homebrew/bin/git for-each-ref --sort=-creatordate --format=%(refname:lstrip=2) %(creatordate:unix) refs/tags`
2026-04-13T09:26:10.570530Z DEBUG Using tag `0.51` cutoff timestamp 1760526949
2026-04-13T09:26:10.570556Z TRACE Executing `cd /var/folders/_p/1cq1n46912n0_4fhfh1l3fkx_r5kw6/T/.tmpPxdPvH && /Users/.../homebrew/bin/git tag --points-at 0.51^{}`
2026-04-13T09:26:10.578756Z DEBUG Using best candidate tag `0.51` for revision `0.51`
2026-04-13T09:26:10.578780Z TRACE Executing `cd /var/folders/_p/1cq1n46912n0_4fhfh1l3fkx_r5kw6/T/.tmpPxdPvH && /Users/.../homebrew/bin/git checkout --quiet 0.51 -- .pre-commit-hooks.yaml`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions