From 562fa673e51a4bde38d3920050e87c1335fdb915 Mon Sep 17 00:00:00 2001 From: Shanshan Shen <467638484@qq.com> Date: Tue, 4 Mar 2025 17:14:00 +0800 Subject: [PATCH] [Bugfix] Exclude collect_env.py from CODESPELL check in format.sh (#240) ### What this PR does / why we need it? Exclude `collect_env.py` from `CODESPELL` check in `format.sh`, otherwise it will get the error shown below: ```bash vLLM yapf: Done vLLM mypy: Running mypy on vllm_ascend Success: no issues found in 18 source files Running mypy on examples Success: no issues found in 3 source files Running mypy on tests Success: no issues found in 3 source files vLLM mypy: Done collect_env.py:410: CANN ==> CAN ``` ### Does this PR introduce _any_ user-facing change? no. ### How was this patch tested? no. Signed-off-by: Shanshan Shen <467638484@qq.com> --- format.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/format.sh b/format.sh index 9ea7495..55318f8 100755 --- a/format.sh +++ b/format.sh @@ -107,9 +107,8 @@ format_changed() { if ! git diff --diff-filter=ACM --quiet --exit-code "$MERGEBASE" -- '*.py' '*.pyi' &>/dev/null; then git diff --name-only --diff-filter=ACM "$MERGEBASE" -- '*.py' '*.pyi' | xargs -P 5 \ - yapf --in-place "${YAPF_EXCLUDES[@]}" "${YAPF_FLAGS[@]}" + yapf --in-place "${YAPF_EXCLUDES[@]}" "${YAPF_FLAGS[@]}" fi - } # Format all files @@ -141,7 +140,7 @@ echo 'vLLM mypy: Done' # https://github.com/codespell-project/codespell/issues/1915 # Avoiding the "./" prefix and using "/**" globs for directories appears to solve the problem CODESPELL_EXCLUDES=( - '--skip' 'tests/prompts/**,./benchmarks/sonnet.txt,*tests/lora/data/**,build/**' + '--skip' 'tests/prompts/**,./benchmarks/sonnet.txt,*tests/lora/data/**,build/**,collect_env.py' ) # check spelling of specified files