README: Document how to use pre-commit (#2639)

This commit is contained in:
William Jamieson
2022-12-12 10:07:10 -05:00
committed by GitHub
parent 075a517423
commit fa3a11e566

View File

@ -154,6 +154,29 @@ config files.
.. _tomli: https://pypi.org/project/tomli/
`pre-commit <https://pre-commit.com/>`_ hook
--------------------------------------------
codespell also works with `pre-commit`, using
.. code-block:: yaml
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell
If one configures codespell using the `pyproject.toml` file instead use:
.. code-block:: yaml
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell
additional_dependencies:
- tomli
Dictionary format
-----------------