I'm setting up a python project for my team using pipenv, I've installed the pre-commit library in the Pipfile and when a new developer clone my repo and runs pipenv install
then the pre-commit doesn't work. It's necessary to run pre-commit install
and pre-commit run --all-files
to make it work.
this is my .pre-commit-config.yaml file that I want to run in pre-commit.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: requirements-txt-fixer
- id: flake8
exclude: migrations
- repo: local
hooks:
- id: system
name: PyLint
entry: python -m pylint.__main__
language: system
files: \.py$
exclude: migrations
There is a way to run the pre-commit after a clean pipenv install and avoid to run pre-commit install and pre-commit run?