Search code examples
pre-commit.com

What is the meaning of . (dot, period) in additional_dependencies array of pre-commit config?


I came across the following .pre-commit-hooks.yaml here. It contains the following section:

additional_dependencies:
  - .

What is the meaning of the dot? Is it necessary?


After solution I created PR to remove the unused . here.


Solution

  • in this case it does nothing, it is a mistake. I believe an older version of this was selecting specific extras like .[core] and this is an artifact of that

    . is always installed and is the hook repository (in this case ansible-lint)


    disclaimer: I wrote pre-commit