PEP 8

pep8

PEP 8 -- Style Guide for Python Code pep8 - Python style guide checker

Installation

pip install pep8

Usage

  • Appointed

    pep8 mypythonfile.py mypythonfile2.py
    
  • ALL

    pep8 .
    
    • Equivalent to pep8 **/*.py

Configuration

  • pep8.sh

    #!/bin/bash
    
    # Ignoring autogenerated files
    #  -- Migration directories
    # Ignoring error codes
    #  -- E128 continuation line under-indented for visual indent
    #  -- E501 line too long
    
    pep8 --exclude=migrations --ignore=E128,E501 .
    
  • exec

    ./pep8.sh
    

References

[1] Docs@Python, PEP 8 -- Style Guide for Python Code

[2] PyCQA@Github, pep8 - Python style guide checker

results matching ""

    No results matching ""