python - 如何卸载预提交

标签 python uninstallation pre-commit.com

遵循预提交 website 上的“非管理安装”说明,我运行了以下命令:

curl http://pre-commit.com/install-local.py | python

这些说明提供了以下注释:“(要升级:再次运行,要卸载:将卸载传递给 python)。

现在,我想卸载预提交。我想了解如何将卸载传递给Python。我不确定通过 uninstall 会带来什么。

我已经尝试过:

curl http://pre-commit.com/install-local.py | python --uninstall
curl http://pre-commit.com/install-local.py | --uninstall python
curl http://pre-commit.com/install-local.py | uninstall | python

..还有其他一些可能更无意义的变体。所有这些都会导致:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Unknown option: -n
usage: /usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
100  2590  100  2590    0     0  14175      0 --:--:-- --:--:-- --:--:-- 14230
(23) Failed writing body

最佳答案

有非常精细的选项 -> 预提交卸载 -h

要删除每个钩子(Hook):
预提交卸载 -t 预提交 -t 预合并提交 -t 预推送 -t 准备提交消息 -t 提交消息 -t 提交后 -t 结帐后 -t 后-合并-t重写后

防白痴卸载:

pip install pre-commit \
&& pre-commit uninstall -t pre-commit -t pre-merge-commit -t pre-push -t prepare-commit-msg -t commit-msg -t post-commit -t post-checkout -t post-merge -t post-rewrite \
&& pip uninstall pre-commit -y

关于python - 如何卸载预提交,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44334746/

相关文章:

python - 在 python 类中导入模块

python - 不小心删除了 dist-packages 文件夹,现在该怎么办?

python - zsh : command not found: pre-commit but package installed

python - python 的自动代码检查工作不正确

python - pip python 包的文档(而不是命令行工具)

python - 使用 MultiIndex 沿多个维度对 Pandas 系列进行切片的有效方法是什么?

file - 更新以前的安装设置

python - autopep8 似乎没有找到配置文件?

python - 将 Django 命令分组到同一应用程序内的文件夹中

docker - 如何从 ubuntu 14.04 中完全删除 docker