【问题标题】:pre-commit.com: Same version in .pre-commit-config.yaml and requirements.txtpre-commit.com:.pre-commit-config.yaml 和 requirements.txt 中的相同版本
【发布时间】:2021-01-28 15:30:20
【问题描述】:

我想在requirements.txt.pre-commit-config.yaml 中使用完全相同版本的flake8。

为了避免冗余,我想在我的 repo 中只保留 flake8 的版本号一次。

pre-commit.com 可以从requirements.txt读取flake8的版本号吗?

【问题讨论】:

标签: pre-commit.com


【解决方案1】:

不能

预提交故意不从被测存储库中读取,因为这使得缓存变得难以处理

您可以在this issue 中阅读更多内容,以及那里链接的许多重复问题

对我来说,我不再在我的需求文件中包含 flake8 等,因为预提交 替换 需要在其他地方安装 linter / 代码格式化程序


免责声明:我创建了预提交

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-08-19
    • 2017-05-15
    • 2019-05-22
    • 1970-01-01
    • 1970-01-01
    • 2021-02-16
    • 2019-01-08
    相关资源
    最近更新 更多