From 441a62e937b81481274ac76a4d4e24566dcd21b6 Mon Sep 17 00:00:00 2001 From: Shanshan Shen <467638484@qq.com> Date: Fri, 14 Mar 2025 10:21:35 +0800 Subject: [PATCH] [Doc] Fix bugs of installation doc and format tool (#330) ### What this PR does / why we need it? Fix bugs of installation doc and format tool. ### Does this PR introduce _any_ user-facing change? no. ### How was this patch tested? no. Signed-off-by: shen-shanshan <467638484@qq.com> --- docs/source/installation.md | 2 +- format.sh | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/source/installation.md b/docs/source/installation.md index 4d281b3..474a137 100644 --- a/docs/source/installation.md +++ b/docs/source/installation.md @@ -92,7 +92,7 @@ chmod +x ./Ascend-cann-kernels-910b_8.0.0_linux-aarch64.run ./Ascend-cann-kernels-910b_8.0.0_linux-aarch64.run --install wget https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%208.0.0/Ascend-cann-nnal_8.0.0_linux-aarch64.run -chmod +x. /Ascend-cann-nnal_8.0.0_linux-aarch64.run +chmod +x ./Ascend-cann-nnal_8.0.0_linux-aarch64.run ./Ascend-cann-nnal_8.0.0_linux-aarch64.run --install source /usr/local/Ascend/nnal/atb/set_env.sh diff --git a/format.sh b/format.sh index 55318f8..ce39443 100755 --- a/format.sh +++ b/format.sh @@ -140,16 +140,20 @@ 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/**,collect_env.py' + '--skip' 'tests/prompts/**,./benchmarks/sonnet.txt,*tests/lora/data/**,build/**' +) + +CODESPELL_IGNORE_WORDS=( + '-L' 'CANN,NNAL,ASCEND' ) # check spelling of specified files spell_check() { - codespell "$@" + codespell "$@" "${CODESPELL_IGNORE_WORDS[@]}" } spell_check_all(){ - codespell --toml pyproject.toml "${CODESPELL_EXCLUDES[@]}" + codespell --toml pyproject.toml "${CODESPELL_EXCLUDES[@]}" "${CODESPELL_IGNORE_WORDS[@]}" } # Spelling check of files that differ from main branch. @@ -163,7 +167,7 @@ spell_check_changed() { MERGEBASE="$(git merge-base origin/main HEAD)" 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 \ - codespell "${CODESPELL_EXCLUDES[@]}" + codespell "${CODESPELL_EXCLUDES[@]}" "${CODESPELL_IGNORE_WORDS[@]}" fi }