From 21cd6109330f0c650dcc766c31f84908be789c52 Mon Sep 17 00:00:00 2001 From: Tyler Michael Smith Date: Thu, 13 Feb 2025 20:27:40 +0000 Subject: [PATCH 1/5] Inherit codespell settings from pyproject.toml in precommit hook Signed-off-by: Tyler Michael Smith --- .pre-commit-config.yaml | 3 ++- requirements-lint.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 22b51afdc57a..f07477db2cdc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,8 @@ repos: rev: v2.4.0 hooks: - id: codespell - exclude: 'benchmarks/sonnet.txt|(build|tests/(lora/data|models/fixtures|prompts))/.*|vllm/third_party/.*' + additional_dependencies: ['tomli'] + args: ['--toml', 'pyproject.toml'] - repo: https://github.com/PyCQA/isort rev: 5.13.2 hooks: diff --git a/requirements-lint.txt b/requirements-lint.txt index 62446f94048d..b4c48839c315 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,2 +1,3 @@ # formatting +tomli pre-commit==4.0.1 From 2e8c6bef5f45d5bcdde4c08272d9dd3a0aa202c1 Mon Sep 17 00:00:00 2001 From: Tyler Michael Smith Date: Thu, 13 Feb 2025 20:45:45 +0000 Subject: [PATCH 2/5] add exclude back in Signed-off-by: Tyler Michael Smith --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f07477db2cdc..a465f0e36634 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,6 +21,7 @@ repos: - id: codespell additional_dependencies: ['tomli'] args: ['--toml', 'pyproject.toml'] + exclude: 'benchmarks/sonnet.txt|(build|tests/(lora/data|models/fixtures|prompts))/.*|vllm/third_party/.*' - repo: https://github.com/PyCQA/isort rev: 5.13.2 hooks: From 6d18b0a0f894eea7452993df15af4a1a017e9576 Mon Sep 17 00:00:00 2001 From: Tyler Michael Smith Date: Thu, 13 Feb 2025 21:11:09 +0000 Subject: [PATCH 3/5] reviews Signed-off-by: Tyler Michael Smith --- .pre-commit-config.yaml | 1 - pyproject.toml | 2 +- requirements-lint.txt | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a465f0e36634..f07477db2cdc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,6 @@ repos: - id: codespell additional_dependencies: ['tomli'] args: ['--toml', 'pyproject.toml'] - exclude: 'benchmarks/sonnet.txt|(build|tests/(lora/data|models/fixtures|prompts))/.*|vllm/third_party/.*' - repo: https://github.com/PyCQA/isort rev: 5.13.2 hooks: diff --git a/pyproject.toml b/pyproject.toml index 9892967b82d7..96a54042da42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,7 +92,7 @@ exclude = [ [tool.codespell] ignore-words-list = "dout, te, indicies, subtile, ElementE" -skip = "./tests/models/fixtures,./tests/prompts,./benchmarks/sonnet.txt,./tests/lora/data,./build" +skip = "./tests/models/fixtures,./tests/prompts,./benchmarks/sonnet.txt,./tests/lora/data,./build,./vllm/third_party" [tool.isort] use_parentheses = true diff --git a/requirements-lint.txt b/requirements-lint.txt index b4c48839c315..62446f94048d 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,3 +1,2 @@ # formatting -tomli pre-commit==4.0.1 From ab4689e9b2ca9b3b0db5f0674c995265730b9368 Mon Sep 17 00:00:00 2001 From: Tyler Michael Smith Date: Thu, 13 Feb 2025 21:13:46 +0000 Subject: [PATCH 4/5] try changing paths Signed-off-by: Tyler Michael Smith --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 96a54042da42..763b06a9b700 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,7 +92,7 @@ exclude = [ [tool.codespell] ignore-words-list = "dout, te, indicies, subtile, ElementE" -skip = "./tests/models/fixtures,./tests/prompts,./benchmarks/sonnet.txt,./tests/lora/data,./build,./vllm/third_party" +skip = "tests/models/fixtures,tests/prompts,benchmarks/sonnet.txt,tests/lora/data,build,vllm/third_party" [tool.isort] use_parentheses = true From 17e30352998ef850f502a479a1114c320682b90b Mon Sep 17 00:00:00 2001 From: Tyler Michael Smith Date: Thu, 13 Feb 2025 21:23:11 +0000 Subject: [PATCH 5/5] this works Signed-off-by: Tyler Michael Smith --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 763b06a9b700..fd705e7e828e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,7 +92,7 @@ exclude = [ [tool.codespell] ignore-words-list = "dout, te, indicies, subtile, ElementE" -skip = "tests/models/fixtures,tests/prompts,benchmarks/sonnet.txt,tests/lora/data,build,vllm/third_party" +skip = "tests/models/fixtures/*,tests/prompts/*,benchmarks/sonnet.txt,tests/lora/data/*,build/*,vllm/third_party/*" [tool.isort] use_parentheses = true