開發(fā)工具插件
git-hooks(推薦)
commit前對(duì)py文件進(jìn)行flake8檢查
參考文章: Automatically check your Python code for errors before committing
-
步驟:
- 新建 .git/hooks/pre-commit, 內(nèi)容如下:
#!/usr/bin/env bash flake8 .
- 然后執(zhí)行:
chmod +x .git/hooks/pre-commit
commit前對(duì)py文件進(jìn)行flake8檢查
參考文章: Automatically check your Python code for errors before committing
步驟:
#!/usr/bin/env bash
flake8 .
chmod +x .git/hooks/pre-commit