From 239ba05e857c8a76b3ca0a8a067fea17158e6346 Mon Sep 17 00:00:00 2001 From: Stanley Law Date: Fri, 20 Jun 2025 15:47:27 +0000 Subject: [PATCH 1/4] docs: add pre-commit --- CONTRIBUTING.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 929e5f5041..141d4118ac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,6 +12,11 @@ Thank you for your interest in contributing to the MCP Python SDK! This document ```bash uv sync --frozen --all-extras --dev ``` +6. Set up pre-commit hooks: + + ```bash + uv tool install pre-commit --with pre-commit-uv --force-install + ``` ## Development Workflow @@ -40,6 +45,12 @@ uv run ruff check . uv run ruff format . ``` +7. (Optional) Run pre-commit hooks on all files: + +```bash +pre-commit run --all-files +``` + 7. Submit a pull request to the same branch you branched from ## Code Style From 683ce885231eb19897f89ad428c8f59c1bb71ccb Mon Sep 17 00:00:00 2001 From: Stanley Law Date: Sat, 21 Jun 2025 01:27:11 +0800 Subject: [PATCH 2/4] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 141d4118ac..98a2701ace 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,7 +51,7 @@ uv run ruff format . pre-commit run --all-files ``` -7. Submit a pull request to the same branch you branched from +8. Submit a pull request to the same branch you branched from ## Code Style From d4f3cfc07657799f8d36416d98f8bc4aecc72e4a Mon Sep 17 00:00:00 2001 From: Stanley Law Date: Sun, 6 Jul 2025 13:17:26 +0800 Subject: [PATCH 3/4] Update CONTRIBUTING.md fix typo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 98a2701ace..3598e9fc63 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ uv sync --frozen --all-extras --dev 6. Set up pre-commit hooks: ```bash - uv tool install pre-commit --with pre-commit-uv --force-install + uv tool install pre-commit --with pre-commit-uv --force-reinstall ``` ## Development Workflow From aac419f20bd25cd3db711e42c08416bd0d3ac7c6 Mon Sep 17 00:00:00 2001 From: Felix Weinberger Date: Thu, 17 Jul 2025 13:07:30 +0100 Subject: [PATCH 4/4] Fix code block indentation formatting in CONTRIBUTING.md - Align step 6 code block with other steps - Remove extra blank line before step 8 code block - Improve overall formatting consistency --- CONTRIBUTING.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8de82997dd..1617cd9f10 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,11 +12,12 @@ Thank you for your interest in contributing to the MCP Python SDK! This document ```bash uv sync --frozen --all-extras --dev ``` + 6. Set up pre-commit hooks: - ```bash - uv tool install pre-commit --with pre-commit-uv --force-reinstall - ``` +```bash +uv tool install pre-commit --with pre-commit-uv --force-reinstall +``` ## Development Workflow