All Projects → cbrueffer → Pep8 Git Hook

cbrueffer / Pep8 Git Hook

Git pre-commit hook that checks for Python PEP8 style compliance.

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Pep8 Git Hook

Torch Models
Stars: ✭ 65 (-54.55%)
Mutual labels:  style
Translucent
Translucent plastic card theme.
Stars: ✭ 93 (-34.97%)
Mutual labels:  style
Xray React
React layout debugger.
Stars: ✭ 128 (-10.49%)
Mutual labels:  style
Computed Style To Inline Style
Convert a HTML element's computed CSS to inline CSS.
Stars: ✭ 67 (-53.15%)
Mutual labels:  style
Nano Style
React functional CSS-in-JS
Stars: ✭ 85 (-40.56%)
Mutual labels:  style
Php Cs Fixer Configurator
Inspect PHP-CS-Fixer fixers and easily configure them
Stars: ✭ 124 (-13.29%)
Mutual labels:  style
Redpaper
A tool to download and set desktop wallpapers from Reddit
Stars: ✭ 64 (-55.24%)
Mutual labels:  style
Pt Three Ways
Path tracing, done three ways
Stars: ✭ 135 (-5.59%)
Mutual labels:  style
Glamorous Primitives
💄 style primitive React interfaces with glamorous
Stars: ✭ 91 (-36.36%)
Mutual labels:  style
Kcc
k crash course
Stars: ✭ 127 (-11.19%)
Mutual labels:  style
Tiza
Console styling for browsers
Stars: ✭ 74 (-48.25%)
Mutual labels:  style
Swiftui Css
A CSS-like style library for SwiftUI.
Stars: ✭ 85 (-40.56%)
Mutual labels:  style
Style Dictionary
A build system for creating cross-platform styles.
Stars: ✭ 2,097 (+1366.43%)
Mutual labels:  style
Snacks
The Instacart Component Library
Stars: ✭ 65 (-54.55%)
Mutual labels:  style
Neuralsongstyle
Audio style transfer AI
Stars: ✭ 129 (-9.79%)
Mutual labels:  style
Linearicons
Linearicons is the highest quality set of line icons, matching with minimalist UI designs in iOS.
Stars: ✭ 64 (-55.24%)
Mutual labels:  style
Standard Engine
🚒 The guts of `standard` modularized for reuse
Stars: ✭ 120 (-16.08%)
Mutual labels:  style
Expo Dark Mode Switch
A beautiful React dark mode switch component for iOS, Android, and Web
Stars: ✭ 137 (-4.2%)
Mutual labels:  style
Css Animation 101 Cn
学习如何为你的 Web 程序添加动效
Stars: ✭ 132 (-7.69%)
Mutual labels:  style
Stylablenavigationbar
🧸 StylableNavigationBar provide a lightweight replacement for a standard UINavigationController, so you can easily manage your navigation and status bar styles throughout your iOS app
Stars: ✭ 127 (-11.19%)
Mutual labels:  style

PEP8 Git Commit Hook

This is a pre-commit hook for Git that checks the code to be committed for Python PEP8 style compliance. The hook will prevent the commit in case style violations are detected.

Installation:

  1. Install the pycodestyle (formally called pep8) program: $ pip install pycodestyle
  2. Save pre-commit as your_project/.git/hooks/pre-commit
  3. Mark pre-commit executable: $ chmod +x your_project/.git/hooks/pre-commit

The hook can be overridden: $ git commit --no-verify

Currently, the following PEP8 codes are checked for:

E111 indentation is not a multiple of four
E125 continuation line does not distinguish itself from next logical line
E203 whitespace before ':'
E261 at least two spaces before inline comment
E262 inline comment should start with '# '
E301 expected 1 blank line, found 0
E302 expected 2 blank lines, found 1
E303 too many blank lines (2)
E502 the backslash is redundant between brackets
E701 multiple statements on one line (colon)
E711 comparison to None should be 'if cond is None:'
W291 trailing whitespace
W293 blank line contains whitespace

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 pycodestyle program (e.g., --max-line-length=120) can be added to the overrides list.

This code was forked from https://gist.github.com/810399.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].