scientific-python / blog.scientific-python.org

Community blog posts on scientific-python.org
https://blog.scientific-python.org
Other
23 stars 33 forks source link

Update precommit repos #174

Closed jarrodmillman closed 9 months ago

jarrodmillman commented 9 months ago

Switch to quarterly updates and manually updated via:

import yaml
import subprocess

file = ".pre-commit-config.yaml"

with open(file) as f:
    data = yaml.safe_load(f)

repos = []
for repo in data["repos"]:
    if "mirrors-prettier" not in repo["repo"]:
        repos.append("--repo")
        repos.append(repo["repo"])

command = ["pre-commit", "autoupdate", "--freeze"] + repos
print(" ".join(command))
subprocess.call(command)

Work around to avoid updating to an alpha version of https://github.com/pre-commit/mirrors-prettier.