1

In python project I have pre-commit-config.yaml with black and mypy checkers. The goal is to before checking for errors, first run black . and mypy ./ to fix possible errors and then run hooks.

- repo: local
  hooks:
  -   id: code-formatter
      exclude: .pre-commit-config.yaml
      name: Format code
      entry: black .
      language: python
  -   id: mypy
      exclude: .pre-commit-config.yaml
      name: Check types
      entry: mypy --scripts-are-modules ./
      language: python
anthony sottile
  • 61,815
  • 15
  • 148
  • 207
  • what isn't working? what do you expect to happen? what are you seeing? have you tried going through the quick start guide: https://pre-commit.com/#quick-start – anthony sottile Nov 04 '19 at 03:41

0 Answers0