From 77669b09870c4feabae9be4c611ac28265e2d266 Mon Sep 17 00:00:00 2001 From: Xiongfei Wei Date: Thu, 6 Nov 2025 17:22:27 +0000 Subject: [PATCH] Add instruction to set up pre-commit hooks. Signed-off-by: Xiongfei Wei --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 69318de21..8723c3e42 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,5 +31,17 @@ We choose to follow a similar directory structure as vLLM: ## Testing When checking in a new feature, we expect that you you add relevant unit tests as well as CI tests. You can read more about the latter [here](https://github.com/vllm-project/tpu-inference/tree/main/.buildkite#adding-a-new-feature-to-ci). +## Setting up linting, formatting, and static type checking + +``` +pip install pre-commit + +# Linting, formatting and static type checking +pre-commit install --hook-type pre-commit --hook-type commit-msg + +# You can manually run pre-commit with +pre-commit run --all-files +``` + ## Thank You! We wanted to thank you for taking the time to read these guidelines and for your interest in contributing to TPU Inference. All of your contributions help make TPU Infernece a great tool and community for everyone!