Skip to content

Commit 4b0f2d4

Browse files
committed
Update prek config to run ruffen-docs instead of blacken-docs
1 parent d7e4dfe commit 4b0f2d4

1 file changed

Lines changed: 9 additions & 13 deletions

File tree

.pre-commit-config.yaml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,16 @@ repos:
115115
)$
116116
priority: 1
117117

118-
# Priority 2: blacken-docs runs after markdownlint-fix (both modify markdown).
119-
- repo: https://github.com/adamchainz/blacken-docs
120-
rev: 1.20.0
118+
# Priority 2: ruffen-docs runs after markdownlint-fix (both modify markdown).
119+
- repo: local
121120
hooks:
122-
- id: blacken-docs
123-
language: python # means renovate will also update `additional_dependencies`
124-
args: ["--pyi", "--line-length", "130"]
125-
files: '^crates/.*/resources/mdtest/.*\.md'
126-
exclude: |
127-
(?x)^(
128-
.*?invalid(_.+)*_syntax\.md
129-
)$
130-
additional_dependencies:
131-
- black==26.1.0
121+
- id: ruffen-docs
122+
name: Ruff markdown formatting
123+
language: system
124+
entry: cargo
125+
args: ["run", "-p", "ruff", "format", "--preview", "--isolated", "--line-length", "130", "--extension", "py:pyi,python:pyi"]
126+
files: '^crates/.*/resources/mdtest/.*\.md$'
127+
pass_filenames: true
132128
priority: 2
133129

134130
# `actionlint` hook, for verifying correct syntax in GitHub Actions workflows.

0 commit comments

Comments
 (0)