From 09ab90ed3598fbb2fa255229191b90b74d67505f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 19 Dec 2025 04:44:55 -0800 Subject: [PATCH 1/6] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Use=20prek=20as=20a=20?= =?UTF-8?q?pre-commit=20alternative=20(#14572)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: github-actions[bot] --- .github/workflows/pre-commit.yml | 16 ++++++++++------ requirements.txt | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index fa0574d7d..e628ce541 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -21,14 +21,21 @@ jobs: name: Checkout PR for own repo if: env.IS_FORK == 'false' with: - # To be able to commit it needs more than the last commit + # To be able to commit it needs to fetch the head of the branch, not the + # merge commit ref: ${{ github.head_ref }} + # And it needs the full history to be able to compute diffs + fetch-depth: 0 # A token other than the default GITHUB_TOKEN is needed to be able to trigger CI token: ${{ secrets.PRE_COMMIT }} # pre-commit lite ci needs the default checkout configs to work - uses: actions/checkout@v5 name: Checkout PR for fork if: env.IS_FORK == 'true' + with: + # To be able to commit it needs the head branch of the PR, the remote one + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v6 with: @@ -44,12 +51,9 @@ jobs: run: | uv venv uv pip install -r requirements.txt - - name: Run pre-commit + - name: Run prek - pre-commit id: precommit - run: | - # Fetch the base branch for comparison - git fetch origin ${{ github.base_ref }} - uvx pre-commit run --from-ref origin/${{ github.base_ref }} --to-ref HEAD --show-diff-on-failure + run: uvx prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure continue-on-error: true - name: Commit and push changes if: env.IS_FORK == 'false' diff --git a/requirements.txt b/requirements.txt index 1cff1a5a9..3bbab64a4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,6 @@ -r requirements-tests.txt -r requirements-docs.txt -r requirements-translations.txt -pre-commit >=4.5.0,<5.0.0 +prek==0.2.22 # For generating screenshots playwright From 19abc42efe7385d836267782818043ef0876fd0e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 19 Dec 2025 12:45:20 +0000 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [skip ci] --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index ebec6bff6..ee1a6ab13 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -9,6 +9,7 @@ hide: ### Internal +* ⬆️ Use prek as a pre-commit alternative. PR [#14572](https://github.com/fastapi/fastapi/pull/14572) by [@tiangolo](https://github.com/tiangolo). * 👷 Add performance tests with CodSpeed. PR [#14558](https://github.com/fastapi/fastapi/pull/14558) by [@tiangolo](https://github.com/tiangolo). ## 0.125.0 From 75d4f9c09837901d60fe910cad40d0a42a99b586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 19 Dec 2025 04:51:53 -0800 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=94=A7=20Add=20LLM=20prompt=20file=20?= =?UTF-8?q?for=20Ukrainian,=20generated=20from=20the=20existing=20translat?= =?UTF-8?q?ions=20(#14548)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/uk/llm-prompt.md | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 docs/uk/llm-prompt.md diff --git a/docs/uk/llm-prompt.md b/docs/uk/llm-prompt.md new file mode 100644 index 000000000..d55d36ab5 --- /dev/null +++ b/docs/uk/llm-prompt.md @@ -0,0 +1,46 @@ +### Target language + +Translate to Ukrainian (українська). + +Language code: uk. + +### Grammar and tone + +1) Use polite/formal address consistent with existing Ukrainian docs (use “ви/ваш”). +2) Keep the tone concise and technical. + +### Headings + +1) Follow existing Ukrainian heading style; keep headings short and instructional. +2) Do not add trailing punctuation to headings. + +### Quotes + +1) Prefer Ukrainian guillemets «…» for quoted terms in prose, matching existing Ukrainian docs. +2) Never change quotes inside inline code, code blocks, URLs, or file paths. + +### Ellipsis + +1) Keep ellipsis style consistent with existing Ukrainian docs. +2) Never change `...` in code, URLs, or CLI examples. + +### Preferred translations / glossary + +Use the following preferred translations when they apply in documentation prose: + +- request (HTTP): запит +- response (HTTP): відповідь +- path operation: операція шляху +- path operation function: функція операції шляху + +### `///` admonitions + +1) Keep the admonition keyword in English (do not translate `note`, `tip`, etc.). +2) If a title is present, prefer these canonical titles (choose one canonical form where variants exist): + +- `/// note | Примітка` +- `/// note | Технічні деталі` +- `/// tip | Порада` +- `/// warning | Попередження` +- `/// info | Інформація` +- `/// danger | Обережно` From 261c11b218e0af717d6b08ee33c875c9c32595f5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 19 Dec 2025 12:52:40 +0000 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [skip ci] --- docs/en/docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index ee1a6ab13..2576a062e 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -7,6 +7,10 @@ hide: ## Latest Changes +### Translations + +* 🔧 Add LLM prompt file for Ukrainian, generated from the existing translations. PR [#14548](https://github.com/fastapi/fastapi/pull/14548) by [@tiangolo](https://github.com/tiangolo). + ### Internal * ⬆️ Use prek as a pre-commit alternative. PR [#14572](https://github.com/fastapi/fastapi/pull/14572) by [@tiangolo](https://github.com/tiangolo). From d70ed5eceb01ebd3056e31f88805b0cc3d09ed83 Mon Sep 17 00:00:00 2001 From: Paras Verma <134628559+paras-verma7454@users.noreply.github.com> Date: Sat, 20 Dec 2025 12:10:21 +0530 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=93=9D=20Fix=20duplicated=20variable?= =?UTF-8?q?=20in=20`docs=5Fsrc/python=5Ftypes/tutorial005=5Fpy39.py`=20(#1?= =?UTF-8?q?4565)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix duplicated variable in python types example --- docs_src/python_types/tutorial005_py39.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_src/python_types/tutorial005_py39.py b/docs_src/python_types/tutorial005_py39.py index 08ab44a94..6c8edb0ec 100644 --- a/docs_src/python_types/tutorial005_py39.py +++ b/docs_src/python_types/tutorial005_py39.py @@ -1,2 +1,2 @@ def get_items(item_a: str, item_b: int, item_c: float, item_d: bool, item_e: bytes): - return item_a, item_b, item_c, item_d, item_d, item_e + return item_a, item_b, item_c, item_d, item_e From 5c7dceb80f7a5ec49356c8ff72b39596596d385b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 20 Dec 2025 06:40:44 +0000 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [skip ci] --- docs/en/docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 2576a062e..259546d7e 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -7,6 +7,10 @@ hide: ## Latest Changes +### Docs + +* 📝 Fix duplicated variable in `docs_src/python_types/tutorial005_py39.py`. PR [#14565](https://github.com/fastapi/fastapi/pull/14565) by [@paras-verma7454](https://github.com/paras-verma7454). + ### Translations * 🔧 Add LLM prompt file for Ukrainian, generated from the existing translations. PR [#14548](https://github.com/fastapi/fastapi/pull/14548) by [@tiangolo](https://github.com/tiangolo).