Merge ~cjwatson/launchpad:black-pre-commit-mirror into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 95e89699014982427f0d132bfc95db48965515b1
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:black-pre-commit-mirror
Merge into: launchpad:master
Diff against target: 15 lines (+2/-2)
1 file modified
.pre-commit-config.yaml (+2/-2)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+451950@code.launchpad.net

Commit message

pre-commit: Upgrade to black 23.9.1 and use pre-commit mirror

Description of the change

https://black.readthedocs.io/en/stable/change_log.html says "Swapping https://github.com/psf/black to https://github.com/psf/black-pre-commit-mirror in your .pre-commit-config.yaml will make Black about 2x faster". I didn't observe quite that much of an improvement in `pre-commit run -a black`, but it does seem somewhat faster for me, so we might as well.

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) wrote :

If it would not say "official", I'd be a bit worried by the single maintainer, though we certainly can switch back any time.

That all said... it looks like that ruff will also replace black in future, see https://github.com/astral-sh/ruff/issues/1904.

Let's monitor the development, and maybe we can give it a go in a couple of months.

review: Approve
Revision history for this message
Colin Watson (cjwatson) wrote :

Yeah, definitely interested in ruff once it matures a bit more.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
2index 0c51a41..12369b7 100644
3--- a/.pre-commit-config.yaml
4+++ b/.pre-commit-config.yaml
5@@ -35,8 +35,8 @@ repos:
6 lib/contrib/.*
7 |utilities/community-contributions\.py
8 )$
9-- repo: https://github.com/psf/black
10- rev: 23.3.0
11+- repo: https://github.com/psf/black-pre-commit-mirror
12+ rev: 23.9.1
13 hooks:
14 - id: black
15 exclude: |

Subscribers

People subscribed via source and target branches

to status/vote changes: