Getting pre-commit error

Hello everyone!

I'm trying to run pre-commit run --all-files but I'm getting:

❯ pre-commit run --all-files
[WARNING] The 'rev' field of repo '' appears to be a mutable reference (moving tag / branch).  Mutable references are never updated after first install and are not supported.  See for more details.  Hint: `pre-commit autoupdate` often fixes this.
[ERROR] `codemod_remove_float_conversion` is not present in repository  Typo? Perhaps it is introduced in a newer version?  Often `pre-commit autoupdate` fixes this.

If I run pre-commit autoupdate as suggested, it fixes the issue, but also next time I run the run command, it will mess up all the files, as it updates all the hooks.

Any idea what the fix for this issue is? Sorry I'm not familiar with this tool :frowning:

Is it from an up-to-date branch/checkout from GitHub? Also, which branch?

On the latest version of maintenance

There's currently a few small issues outstanding since Python 2 support was removed in the maintenance branch - I'll check out the pre-commit stuff at some point over the weekend, and see if it can be sorted.

1 Like

I just did a major overhaul of all the pre-commit repo versions pulled in and also am pinning our own codemods now, so that issue should be resolved against latest maintenance.