Skip to content

Conversation

@jarrodmillman
Copy link
Member

@jarrodmillman jarrodmillman commented Jan 18, 2024

Switch to quarterly updates and manually updated via:

import yaml
import subprocess

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

with open(file, "r") 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
subprocess.call(command)

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

@stefanv
Copy link
Member

stefanv commented Jan 18, 2024

What does that Python script do?

The patch looks fine.

@jarrodmillman
Copy link
Member Author

jarrodmillman commented Jan 18, 2024

It runs this:

pre-commit autoupdate --freeze --repo https://github.com/pre-commit/pre-commit-hooks --repo https://github.com/psf/black --repo https://github.com/adamchainz/blacken-docs --repo https://github.com/asottile/pyupgrade

If you run

pre-commit autoupdate --freeze

it updates mirrors-prettier to an alpha release. The script grabs all the repos except mirrors-prettier and then autoupdates those.

@jarrodmillman
Copy link
Member Author

I then just updated the mirrors-prettier repo by hand.

@stefanv
Copy link
Member

stefanv commented Jan 18, 2024

Ah, OK, but the quarterly run still has the alpha-inducing behavior?

@jarrodmillman
Copy link
Member Author

Yes, I am hoping there will be a stable release soon. If not, we will only have PRs to close 4 times a year.

@stefanv stefanv merged commit 6f565f7 into scientific-python:main Jan 18, 2024
@jarrodmillman jarrodmillman added this to the 0.2 milestone Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants