1
- pep8 - Python style guide checker
2
- =================================
1
+ pycodestyle (formerly called pep8) - Python style guide checker
2
+ ===============================================================
3
3
4
- pep8 is a tool to check your Python code against some of the style
4
+ pycodestyle is a tool to check your Python code against some of the style
5
5
conventions in `PEP 8 `_.
6
6
7
7
.. _PEP 8 : http://www.python.org/dev/peps/pep-0008/
8
8
9
+ .. note ::
10
+
11
+ This package used to be called ``pep8 `` but was renamed to ``pycodestyle ``
12
+ to reduce confusion. Further discussion `here
13
+ <https://github.com/PyCQA/pydocstyle/issues/466> `_.
9
14
10
15
Features
11
16
--------
@@ -15,18 +20,18 @@ Features
15
20
* Parseable output: Jump to error location in your editor.
16
21
17
22
* Small: Just one Python file, requires only stdlib. You can use just
18
- the pep8 .py file for this purpose.
23
+ the pycodestyle .py file for this purpose.
19
24
20
25
* Comes with a comprehensive test suite.
21
26
22
27
Installation
23
28
------------
24
29
25
- You can install, upgrade, uninstall pep8 .py with these commands::
30
+ You can install, upgrade, uninstall pycodestyle .py with these commands::
26
31
27
- $ pip install pep8
28
- $ pip install --upgrade pep8
29
- $ pip uninstall pep8
32
+ $ pip install pycodestyle
33
+ $ pip install --upgrade pycodestyle
34
+ $ pip uninstall pycodestyle
30
35
31
36
There's also a package for Debian/Ubuntu, but it's not always the
32
37
latest version.
@@ -36,7 +41,7 @@ Example usage and output
36
41
37
42
::
38
43
39
- $ pep8 --first optparse.py
44
+ $ pycodestyle --first optparse.py
40
45
optparse.py:69:11: E401 multiple imports on one line
41
46
optparse.py:77:1: E302 expected 2 blank lines, found 1
42
47
optparse.py:88:5: E301 expected 1 blank line, found 0
@@ -46,10 +51,10 @@ Example usage and output
46
51
optparse.py:472:29: E221 multiple spaces before operator
47
52
optparse.py:544:21: W601 .has_key() is deprecated, use 'in'
48
53
49
- You can also make pep8 .py show the source code for each error, and
54
+ You can also make pycodestyle .py show the source code for each error, and
50
55
even the relevant text from PEP 8::
51
56
52
- $ pep8 --show-source --show-pep8 testsuite/E40.py
57
+ $ pycodestyle --show-source --show-pep8 testsuite/E40.py
53
58
testsuite/E40.py:2:10: E401 multiple imports on one line
54
59
import os, sys
55
60
^
@@ -61,7 +66,7 @@ even the relevant text from PEP 8::
61
66
62
67
Or you can display how often each error was found::
63
68
64
- $ pep8 --statistics -qq Python-2.5/Lib
69
+ $ pycodestyle --statistics -qq Python-2.5/Lib
65
70
232 E201 whitespace after '['
66
71
599 E202 whitespace before ')'
67
72
631 E203 whitespace before ','
@@ -78,14 +83,14 @@ Or you can display how often each error was found::
78
83
Links
79
84
-----
80
85
81
- .. image :: https://api.travis-ci.org/PyCQA/pep8 .png?branch=master
82
- :target: https://travis-ci.org/PyCQA/pep8
86
+ .. image :: https://api.travis-ci.org/PyCQA/pycodestyle .png?branch=master
87
+ :target: https://travis-ci.org/PyCQA/pycodestyle
83
88
:alt: Build status
84
89
85
- .. image :: https://pypip.in/wheel/pep8 /badge.png?branch=master
86
- :target: https://pypi.python.org/pypi/pep8
90
+ .. image :: https://pypip.in/wheel/pycodestyle /badge.png?branch=master
91
+ :target: https://pypi.python.org/pypi/pycodestyle
87
92
:alt: Wheel Status
88
93
89
- * `Read the documentation <http://pep8 .readthedocs.org/ >`_
94
+ * `Read the documentation <http://pycodestyle .readthedocs.org/ >`_
90
95
91
96
* `Fork me on GitHub <http://github.com/PyCQA/pycodestyle >`_
0 commit comments