Skip to content

Git pre-commit hook that automatically formats Python code to conform to the PEP 8 style guide.

License

Notifications You must be signed in to change notification settings

chibiegg/git-autopep8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

autopep8 Git Commit Hook

Installation:

  1. $ cd your_project
  2. Install the autopep8 program: $ pip install autopep8
  3. Save pre-commit with $ wget https://raw.githubusercontent.com/chibiegg/git-autopep8/master/pre-commit -O .git/hooks/pre-commit
  4. Mark pre-commit executable: $ chmod +x .git/hooks/pre-commit

In case you want to modify the list of codes to ignore, edit the ignore_codes list in the pre-commit file.
If you want to select only specific codes to scan for, use the select_codes list. Additional arguments to the pep8 program (e.g., --max-line-length=120) can be added to the overrides list.

This code was forked from https://gist.github.com/810399 and https://github.com/cbrueffer/pep8-git-hook.

This software is released under the MIT License, see LICENSE.txt.

About

Git pre-commit hook that automatically formats Python code to conform to the PEP 8 style guide.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages