Skip to content

Commit 58cc356

Browse files
CI/STYLE: run black before ruff in pre-commit (#51416)
1 parent 0796d9d commit 58cc356

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.pre-commit-config.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ default_stages: [
1515
ci:
1616
autofix_prs: false
1717
repos:
18+
- repo: local
19+
hooks:
20+
# NOTE: we make `black` a local hook because if it's installed from
21+
# PyPI (rather than from source) then it'll run twice as fast thanks to mypyc
22+
- id: black
23+
name: black
24+
description: "Black: The uncompromising Python code formatter"
25+
entry: black
26+
language: python
27+
require_serial: true
28+
types_or: [python, pyi]
29+
additional_dependencies: [black==23.1.0]
1830
- repo: https://github.com/charliermarsh/ruff-pre-commit
1931
rev: v0.0.244
2032
hooks:
@@ -116,16 +128,6 @@ repos:
116128
- id: sphinx-lint
117129
- repo: local
118130
hooks:
119-
# NOTE: we make `black` a local hook because if it's installed from
120-
# PyPI (rather than from source) then it'll run twice as fast thanks to mypyc
121-
- id: black
122-
name: black
123-
description: "Black: The uncompromising Python code formatter"
124-
entry: black
125-
language: python
126-
require_serial: true
127-
types_or: [python, pyi]
128-
additional_dependencies: [black==23.1.0]
129131
- id: pyright
130132
# note: assumes python env is setup and activated
131133
name: pyright

0 commit comments

Comments
 (0)