Python 3.x 使用pipenv安装自动执行预提交运行

Python 3.x 使用pipenv安装自动执行预提交运行,python-3.x,git,pipenv,pre-commit-hook,pre-commit.com,Python 3.x,Git,Pipenv,Pre Commit Hook,Pre Commit.com,我正在使用pipenv为我的团队设置一个python项目,我已经在Pipfile中安装了预提交库,当一个新开发人员克隆我的repo并运行pipenv install时,预提交就不起作用了。必须运行pre-commit-install和pre-commit-run——所有文件都要运行 这是我要在预提交中运行的.pre-commit-config.yaml文件 repos: - repo: https://github.com/pre-commit/pre-commit-hooks re

我正在使用pipenv为我的团队设置一个python项目,我已经在Pipfile中安装了预提交库,当一个新开发人员克隆我的repo并运行
pipenv install
时,预提交就不起作用了。必须运行
pre-commit-install
pre-commit-run——所有文件都要运行

这是我要在预提交中运行的.pre-commit-config.yaml文件

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

有一种方法可以在干净的pipenv安装后运行预提交,并避免运行预提交安装和预提交运行?

预提交运行
不应该是使其正常工作所必需的--您是否正在寻求一种自动化
预提交安装
的方法?也许会有帮助?