Skip to content

Commit

Permalink
docs: pre-commit autoupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Aug 21, 2023
1 parent f309354 commit 9e37732
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,25 @@ You might get this error while running ``make`` locally.

1. Run ``invoke lint`` (or ``tox -e lint`` directly) to create this tox_ environment.
2. Run ``make`` again.

Missing ``rev`` key when using the default ``pre-commit`` styles
----------------------------------------------------------------

If you're using the default ``pre-commit`` styles, you might get this error:

.. code-block:: shell
An error has occurred: InvalidConfigError:
==> File .pre-commit-config.yaml
==> At Config()
==> At key: repos
==> At Repository(repo='https://github.com/PyCQA/bandit')
=====> Missing required key: rev
Check the log at /Users/your-name/.cache/pre-commit/pre-commit.log
This happens because the default styles don't have a ``rev`` key.
Currently, this is not possible because the pre-commit plugin doesn't support it.

To solve this, you can run ``pre-commit autoupdate`` to update the styles to the latest version, as `recommended in the official docs <https://pre-commit.com/#updating-hooks-automatically>`_.

For more details, `check out this comment on the GitHub issue <https://github.com/andreoliwa/nitpick/issues/472#issuecomment-1079692929>`_.

0 comments on commit 9e37732

Please sign in to comment.