Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion project_name/.pre-commit-config.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ repos:
rev: <placeholder_until_update_deps>
hooks:
- id: blacken-docs
additional_dependencies: [black==<placeholder_until_update_deps>]
additional_dependencies:
- black==0 # sync-with-uv
{%- endif %}
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: <placeholder_until_update_deps>
Expand Down
11 changes: 0 additions & 11 deletions project_name/justfile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ deps-update: && deps-list-outdated
uv sync --upgrade
uv run prek auto-update
uvx sync-with-uv
{%- if format_tool == "black" %}
just _sync-blacken-docs
{%- endif %}
uvx sync-pre-commit-deps --yaml-mapping 2 --yaml-sequence 4 --yaml-offset 2 .pre-commit-config.yaml || { \
echo "Note: '.pre-commit-config.yaml' changed, and might lost its formatting." \
&& exit 1; \
Expand All @@ -50,14 +47,6 @@ deps-update: && deps-list-outdated
# Audit dependencies
deps-audit:
uv audit --locked
{% if format_tool == "black" %}
# Sync blacken-docs' black additional_dependency with the version in uv.lock
_sync-blacken-docs:
@black_ver=$(awk -F'"' '/^\[\[package\]\]/{p=0} /^name = "black"$/{p=1} p && /^version =/{print $2; exit}' uv.lock); \
if [ -n "$black_ver" ] && grep -q 'id: blacken-docs' .pre-commit-config.yaml; then \
sed -i -E "/id: blacken-docs/,/^ - repo:/ s/(black==)(<[^>]*>|[0-9][0-9a-z.+-]*)/\1$black_ver/" .pre-commit-config.yaml; \
fi
{%- endif %}


### code quality ###
Expand Down
Loading