From cda43ffa4d4f04e099e3919c4954aedc0899fc82 Mon Sep 17 00:00:00 2001 From: Jacob Gordon Date: Wed, 21 Jan 2026 14:02:37 -0600 Subject: [PATCH] ci: avoids duplication of codespell config (#17519) --- .codespellrc | 3 +++ .pre-commit-config.yaml | 3 +-- python/pyproject.toml | 4 ---- python/pyproject_cpu.toml | 4 ---- python/pyproject_other.toml | 4 ---- python/pyproject_xpu.toml | 4 ---- 6 files changed, 4 insertions(+), 18 deletions(-) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..75404934a --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +ignore-words-list = ans, als, hel, boostrap, childs, te, vas, hsa, ment +skip = *.json,*.jsonl,*.patch,*.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2a3115638..d440a0a9a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,8 +51,7 @@ repos: rev: v2.4.1 hooks: - id: codespell - additional_dependencies: ['tomli'] - args: ['--toml', 'python/pyproject.toml', '-L', 'cann,thi,makro,wil,rouge,PRIS'] + args: ['--config', '.codespellrc', '-L', 'cann,thi,makro,wil,rouge,PRIS'] exclude: | (?x)^( test/srt/test_reasoning_parser\.py| diff --git a/python/pyproject.toml b/python/pyproject.toml index 25cfdba0b..ba3490fb2 100755 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -175,7 +175,3 @@ version_file = "sglang/_version.py" git_describe_command = ["bash", "-c", "git tag --list --sort=-version:refname 'v*.*.*' | head -1 | xargs git describe --tags --long"] # Allow editable installs even when .git metadata is not available. fallback_version = "0.0.0.dev0" - -[tool.codespell] -ignore-words-list = "ans, als, hel, boostrap, childs, te, vas, hsa, ment" -skip = "*.json,*.jsonl,*.patch,*.txt" diff --git a/python/pyproject_cpu.toml b/python/pyproject_cpu.toml index 5a456266a..3cd7b4c65 100644 --- a/python/pyproject_cpu.toml +++ b/python/pyproject_cpu.toml @@ -133,7 +133,3 @@ exclude = [ root = ".." version_file = "sglang/_version.py" git_describe_command = ["git", "describe", "--tags", "--long", "--match", "v*"] - -[tool.codespell] -ignore-words-list = "ans, als, hel, boostrap, childs, te, vas, hsa, ment" -skip = "*.json,*.jsonl,*.patch,*.txt" diff --git a/python/pyproject_other.toml b/python/pyproject_other.toml index 49e5ca687..a2bfed3dd 100755 --- a/python/pyproject_other.toml +++ b/python/pyproject_other.toml @@ -202,7 +202,3 @@ exclude = [ root = ".." version_file = "sglang/_version.py" git_describe_command = ["git", "describe", "--tags", "--long", "--match", "v*"] - -[tool.codespell] -ignore-words-list = "ans, als, hel, boostrap, childs, te, vas, hsa, ment" -skip = "*.json,*.jsonl,*.patch,*.txt" diff --git a/python/pyproject_xpu.toml b/python/pyproject_xpu.toml index b7e8200a5..5822985e3 100644 --- a/python/pyproject_xpu.toml +++ b/python/pyproject_xpu.toml @@ -137,7 +137,3 @@ exclude = [ root = ".." version_file = "sglang/_version.py" git_describe_command = ["git", "describe", "--tags", "--long", "--match", "v*"] - -[tool.codespell] -ignore-words-list = "ans, als, hel, boostrap, childs, te, vas, hsa, ment" -skip = "*.json,*.jsonl,*.patch,*.txt"