diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7bb30538d8d21ab03639e07571564beaaf70f19..7c0ae83613a9d9eafeedc834945f2d366ffb77b7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,3 +29,8 @@ repos: rev: v0.23.1 hooks: - id: toml-sort-fix + - repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + additional_dependencies: [tomli] diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bad577310f76f2f952fd4772c412ae4978300a4..42c202e7e55ae5421de5f073539353f56d2d2444 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # ChangeLog +## Unreleased + +### New Features +- Moves `codespell` to `pre-commit` (#8040) + ## [0.8.43] - 2023-10-10 ### New Features diff --git a/Makefile b/Makefile index 39301bac8514eb86ae1f3aa85389fb058f9791e9..bd2936e223ef1eabff0f25485413f0df4e958cf2 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,9 @@ help: ## Show all Makefile targets. format: ## Run code autoformatters (black). black . -lint: ## Run linters: mypy, black, codespell, ruff +lint: ## Run linters: pre-commit (black, ruff, codespell) and mypy pre-commit install && pre-commit run --all-files mypy . - codespell . test: ## Run tests via pytest. pytest tests diff --git a/examples/multimodal/data/llama/index_guide.md b/examples/multimodal/data/llama/index_guide.md index 3e57cdcfbdcbf0e166df62f752e3a19798e25b97..4dae03ecabdb7c2d0ae5fbde6c668e1d77abfa40 100644 --- a/examples/multimodal/data/llama/index_guide.md +++ b/examples/multimodal/data/llama/index_guide.md @@ -17,7 +17,7 @@ The summary index simply stores Nodes as a sequential chain. ### Querying During query time, if no other query parameters are specified, LlamaIndex simply loads all Nodes in the list into -our Reponse Synthesis module. +our Response Synthesis module.  diff --git a/experimental/openai_fine_tuning/validate_json.py b/experimental/openai_fine_tuning/validate_json.py index a8aab77506cd5e104a79d886272e354e931b8dad..2b720d424891363a03424951926196bb6384e593 100644 --- a/experimental/openai_fine_tuning/validate_json.py +++ b/experimental/openai_fine_tuning/validate_json.py @@ -165,7 +165,7 @@ def validate_json(data_path: str) -> None: f"~{n_epochs * n_billing_tokens_in_dataset} tokens" ) - print("As of Augest 22, 2023, fine-tuning gpt-3.5-turbo is $0.008 / 1K Tokens.") + print("As of August 22, 2023, fine-tuning gpt-3.5-turbo is $0.008 / 1K Tokens.") print( "This means your total cost for training will be " f"${n_billing_tokens_in_dataset * 0.008 / 1000} per epoch." diff --git a/pyproject.toml b/pyproject.toml index 0cc248f2f2ef19662c601a5e3d3d814a7e726c07..235c8029a55fdd7662d0b74ab1d65739b5b0c5ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,11 +5,10 @@ requires = ["poetry-core"] [tool.codespell] check-filenames = true check-hidden = true -ignore-words-list = "ot,gallary,rouge,narl" -# Remove .git and venv skips when integrated with pre-commit +ignore-words-list = "astroid,gallary,momento,narl,ot,rouge" # Feel free to un-skip examples, and experimental, you will just need to # work through many typos (--write-changes and --interactive will help) -skip = "poetry.lock,./.git,./*venv,./examples,./experimental,*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb" +skip = "./examples,./experimental,*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb" [tool.mypy] disallow_untyped_defs = true diff --git a/requirements.txt b/requirements.txt index 8969be08fa121a9a4b3031c74d6ee78e4030915c..de8e27b5c0c02926d3a70efbba07a118f8a70269 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,7 +17,6 @@ types-setuptools==67.1.0.0 # linting black[jupyter]==23.9.1 -codespell[toml]>=v2.2.6 mypy==0.991 pre-commit==3.2.0 pylint==2.15.10