Skip to content

Commit 3f736e2

Browse files
committed
πŸ“¦πŸ”§ Trigger blacken-docs execution based on formatter choice
1 parent 82a3c0a commit 3f736e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

β€Žproject_name/.pre-commit-config.yaml.jinjaβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,13 @@ repos:
136136
rev: <placeholder_until_update_deps>
137137
hooks:
138138
- id: black{% if contains_jupyter_files %}-jupyter{% endif %}
139-
{%- endif %}
140139
- repo: https://github.com/adamchainz/blacken-docs
141140
rev: <placeholder_until_update_deps>
142141
hooks:
143142
- id: blacken-docs
144143
additional_dependencies:
145144
- black==25.1.0
145+
{%- endif %}
146146
- repo: https://github.com/astral-sh/ruff-pre-commit
147147
rev: <placeholder_until_update_deps>
148148
hooks:

β€Žproject_name/justfile.jinjaβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ format:
4949
just isort
5050
{%- if format_tool == "black" %}
5151
uv run black .
52+
uv run pre-commit run --all-files blacken-docs
5253
{%- elif format_tool == "ruff" %}
5354
uv run ruff format
5455
{%- endif %}
55-
uv run pre-commit run --all-files blacken-docs
5656
uv run pre-commit run --all-files mdformat
5757
{%- if jupyter_files == "strip_outputs" %}
5858
uv run pre-commit run --all-files nbstripout

0 commit comments

Comments
Β (0)