mirror of
https://github.com/vllm-project/vllm-ascend.git
synced 2025-10-20 13:43:53 +08:00
[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>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user