From 625457f0fb86653d8191ab41ea3456c170878be4 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Tue, 6 May 2025 13:36:32 +0800 Subject: [PATCH 1/2] chore: upgrade powrap pre-commit hook --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7cf6db96a6..33a264ab44 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,6 @@ repos: - repo: https://git.afpy.org/AFPy/powrap # there's no release tag in repo, use the latest commit hash id instead - rev: a34a9fed116d24562fbe4bb8d456ade85f056c36 + rev: v1.0.2 hooks: - id: powrap \ No newline at end of file From 52c3cb5a56d4000d47b7b6fb9ecab7d1d1214ce1 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Tue, 6 May 2025 13:37:22 +0800 Subject: [PATCH 2/2] feat(script): run powrap in sync workflow --- .github/workflows/py313-sync-cpython.yml | 2 +- Makefile | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/py313-sync-cpython.yml b/.github/workflows/py313-sync-cpython.yml index 5cf83520c5..f3362c52c5 100644 --- a/.github/workflows/py313-sync-cpython.yml +++ b/.github/workflows/py313-sync-cpython.yml @@ -34,7 +34,7 @@ jobs: uses: astral-sh/setup-uv@v6 - name: Sync with CPython - run: make clone && make merge && make rm_cpython + run: make clone merge rm_cpython wrap - uses: tibdex/github-app-token@v2 id: generate-token diff --git a/Makefile b/Makefile index cd141e9dd6..c0da35f4af 100644 --- a/Makefile +++ b/Makefile @@ -156,6 +156,10 @@ rm_cpython: ## Remove cloned cpython repo lint: $(VENV)/bin/sphinx-lint ## Run sphinx-lint $(VENV)/bin/sphinx-lint --enable default-role +.PHONY: wrap +wrap: ## Run powrap on modified po files + uvx powrap --modified + # This allows us to accept extra arguments (by doing nothing when we get a job that doesn't match, rather than throwing an error) %: @: