From 71b2d11549edda1ff8112872745f6ad94a243d5f Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 23 Aug 2022 08:53:23 -0600 Subject: [PATCH] Added pre-commit usage section. (#88) * Added pre-commit usage section. * Update README.rst * Update README.rst Co-authored-by: fsouza <108725+fsouza@users.noreply.github.com> * readme: make pre-commit happy Co-authored-by: fsouza <108725+fsouza@users.noreply.github.com> --- README.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.rst b/README.rst index ba922e2..9dbcf2b 100644 --- a/README.rst +++ b/README.rst @@ -171,3 +171,18 @@ To prevent that, without having to exclude the entire file, you can add a from .endpoints import role, token, user, utils # noqa That line will instruct ``autoflake`` to let that specific line as is. + + +Using pre-commit_ hooks +======================= + +Add the following to your `.pre-commit-config.yaml` + +.. code-block:: yaml + + - repo: https://github.com/PyCQA/autoflake + rev: v1.4 + hooks: + - id: autoflake + +.. _pre-commit: https://pre-commit.com