代码规范工具
pip install pre-commit
然后可以在代码仓里面配置pre-commit
pre-commit install
这样子代码检查的规范的执行就会注册在git的hook当中
然后可以在pre-commit的config里面配置需要的代码规范;
有些规范可以帮你修改,
有些规范不会帮你修改,只会报错,比如flake8;
commit的时候会触发hook帮你检查;
原文地址:https://blog.csdn.net/weixin_39326879/article/details/136740835
http://www.kler.cn/a/271751.html
http://www.kler.cn/a/271751.html