All Projects → PyCQA → Pycodestyle

PyCQA / Pycodestyle

Licence: other
Simple Python style checker in one Python file

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to Pycodestyle

Elements Of Python Style
Goes beyond PEP8 to discuss what makes Python code feel great. A Strunk & White for Python.
Stars: ✭ 3,308 (-25.91%)
Mutual labels:  styleguide, style-guide, pep8
git-style-guide
Руководство по использованию Git на русском языке
Stars: ✭ 30 (-99.33%)
Mutual labels:  styleguide, style-guide
house style
A shared house style for Ruby projects
Stars: ✭ 19 (-99.57%)
Mutual labels:  styleguide, style-guide
Elixir style guide
This is community style guide for the Elixir programming language. Please feel free to make pull requests and suggestions, and be a part of Elixir's vibrant community.
Stars: ✭ 3,870 (-13.33%)
Mutual labels:  styleguide, style-guide
styleguide
Official code style guide of Banksalad
Stars: ✭ 91 (-97.96%)
Mutual labels:  styleguide, style-guide
eslint-config-mingelz
A shared ESLint configuration with Chinese comments. 一份带有完整中文注释的 ESLint 规则。
Stars: ✭ 15 (-99.66%)
Mutual labels:  styleguide, style-guide
SFMC-Cookbook
How to survive as a developer for Salesforce Marketing Cloud
Stars: ✭ 70 (-98.43%)
Mutual labels:  styleguide, style-guide
Nodebestpractices
✅ The Node.js best practices list (December 2021)
Stars: ✭ 72,734 (+1528.98%)
Mutual labels:  styleguide, style-guide
ue5-style-guide
An attempt to make Unreal Engine 4 projects more consistent
Stars: ✭ 2,892 (-35.23%)
Mutual labels:  styleguide, style-guide
Css Style Guide Audit
Audit the CSS on a page to see what elements are using styles from the style guide and which styles are overriding them
Stars: ✭ 353 (-92.09%)
Mutual labels:  styleguide, style-guide
flake8-functions
flake8 plugin for validation of function parameters (length, complexity, etc)
Stars: ✭ 32 (-99.28%)
Mutual labels:  styleguide, flake8-plugin
Ios Handbook
Guidelines and best practices for excellent iOS apps
Stars: ✭ 337 (-92.45%)
Mutual labels:  styleguide, style-guide
kotlin-style-guide
red_mad_robot Kotlin Style Guide
Stars: ✭ 85 (-98.1%)
Mutual labels:  styleguide, style-guide
Javascript
JavaScript Style Guide
Stars: ✭ 117,286 (+2526.79%)
Mutual labels:  styleguide, style-guide
Vuejs Component Style Guide
Vue.js Component Style Guide
Stars: ✭ 2,796 (-37.38%)
Mutual labels:  styleguide, style-guide
styleguide-todo-grammar
/sBin/StyleGuide/ToDo
Stars: ✭ 19 (-99.57%)
Mutual labels:  styleguide, style-guide
Stylemark
Generate interactive style guides from Markdown.
Stars: ✭ 217 (-95.14%)
Mutual labels:  styleguide, style-guide
Livingcss
Parse comments in your CSS to generate a living style guide using Markdown, Handlebars, Polymer, and Prism syntax highlighter.
Stars: ✭ 237 (-94.69%)
Mutual labels:  styleguide, style-guide
python
Python Style Guide
Stars: ✭ 49 (-98.9%)
Mutual labels:  styleguide, style-guide
flake8-cognitive-complexity
An extension for flake8 that validates cognitive functions complexity
Stars: ✭ 44 (-99.01%)
Mutual labels:  styleguide, flake8-plugin

pycodestyle (formerly called pep8) - Python style guide checker

Build status Documentation Status Wheel Status Join the chat at https://gitter.im/PyCQA/pycodestyle

pycodestyle is a tool to check your Python code against some of the style conventions in PEP 8.

Note

This package used to be called pep8 but was renamed to pycodestyle to reduce confusion. Further discussion can be found in the issue where Guido requested this change, or in the lightning talk at PyCon 2016 by @IanLee1521: slides video.

Features

  • Plugin architecture: Adding new checks is easy.
  • Parseable output: Jump to error location in your editor.
  • Small: Just one Python file, requires only stdlib. You can use just the pycodestyle.py file for this purpose.
  • Comes with a comprehensive test suite.

Installation

You can install, upgrade, and uninstall pycodestyle.py with these commands:

$ pip install pycodestyle
$ pip install --upgrade pycodestyle
$ pip uninstall pycodestyle

There's also a package for Debian/Ubuntu, but it's not always the latest version.

Example usage and output

$ pycodestyle --first optparse.py
optparse.py:69:11: E401 multiple imports on one line
optparse.py:77:1: E302 expected 2 blank lines, found 1
optparse.py:88:5: E301 expected 1 blank line, found 0
optparse.py:222:34: W602 deprecated form of raising exception
optparse.py:347:31: E211 whitespace before '('
optparse.py:357:17: E201 whitespace after '{'
optparse.py:472:29: E221 multiple spaces before operator
optparse.py:544:21: W601 .has_key() is deprecated, use 'in'

You can also make pycodestyle.py show the source code for each error, and even the relevant text from PEP 8:

$ pycodestyle --show-source --show-pep8 testsuite/E40.py
testsuite/E40.py:2:10: E401 multiple imports on one line
import os, sys
         ^
    Imports should usually be on separate lines.

    Okay: import os\nimport sys
    E401: import sys, os

Or you can display how often each error was found:

$ pycodestyle --statistics -qq Python-2.5/Lib
232     E201 whitespace after '['
599     E202 whitespace before ')'
631     E203 whitespace before ','
842     E211 whitespace before '('
2531    E221 multiple spaces before operator
4473    E301 expected 1 blank line, found 0
4006    E302 expected 2 blank lines, found 1
165     E303 too many blank lines (4)
325     E401 multiple imports on one line
3615    E501 line too long (82 characters)
612     W601 .has_key() is deprecated, use 'in'
1188    W602 deprecated form of raising exception

Links

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].