flake8(pep8)

开发工具插件

  • vim-flake8

git-hooks(推荐)

  • commit前对py文件进行flake8检查

  • 参考文章: Automatically check your Python code for errors before committing

  • 步骤:

    • 新建 .git/hooks/pre-commit, 内容如下:
    #!/usr/bin/env bash
    flake8 .
    
    • 然后执行:
    chmod +x .git/hooks/pre-commit
    

你可能感兴趣的:(flake8(pep8))