Closed
Description
Summary
In PR #22733 @QuLogic caught a spelling error of mine (which is great!) but there will inevitably be typos that slip through if only humans are checking. https://github.com/codespell-project/codespell is a really nice way to check for typos and it has a nice pre-commit hook. As Matplotlib already uses pre-commit 🚀 (thanks to @ianhi in PR #21583) this would be an easy add. 👍
Proposed fix
Add the following hook (maybe some variations) to .pre-commit-config.yaml
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
files: ^.*\.(py|c|h|md|rst|yml)$
args: ["--write-changes", "--ignore-words-list", "hist,nd"]