1- .. currentmodule :: pep8
1+ .. currentmodule :: pycodestyle
22
33Introduction
44============
55
6- pep8 is a tool to check your Python code against some of the style
6+ pycodestyle is a tool to check your Python code against some of the style
77conventions in `PEP 8 `_.
88
99.. contents ::
@@ -18,7 +18,7 @@ Features
1818* Parseable output: Jump to error location in your editor.
1919
2020* Small: Just one Python file, requires only stdlib. You can use just
21- the pep8 .py file for this purpose.
21+ the pycodestyle .py file for this purpose.
2222
2323* Comes with a comprehensive test suite.
2424
@@ -40,7 +40,7 @@ Always remember this statement from `PEP 8`_:
4040
4141
4242Among other things, these features are currently not in the scope of
43- the ``pep8 `` library:
43+ the ``pycodestyle `` library:
4444
4545* **naming conventions **: this kind of feature is supported through plugins.
4646 Install `flake8 <https://pypi.python.org/pypi/flake8 >`_ and the
@@ -55,24 +55,19 @@ the ``pep8`` library:
5555Installation
5656------------
5757
58- You can install, upgrade, uninstall pep8 .py with these commands::
58+ You can install, upgrade, uninstall pycodestyle .py with these commands::
5959
60- $ pip install pep8
61- $ pip install --upgrade pep8
62- $ pip uninstall pep8
63-
64- There's also a package for Debian/Ubuntu, but it's not always the
65- latest version::
66-
67- $ sudo apt-get install pep8
60+ $ pip install pycodestyle
61+ $ pip install --upgrade pycodestyle
62+ $ pip uninstall pycodestyle
6863
6964
7065Example usage and output
7166------------------------
7267
7368::
7469
75- $ pep8 --first optparse.py
70+ $ pycodestyle --first optparse.py
7671 optparse.py:69:11: E401 multiple imports on one line
7772 optparse.py:77:1: E302 expected 2 blank lines, found 1
7873 optparse.py:88:5: E301 expected 1 blank line, found 0
@@ -82,10 +77,10 @@ Example usage and output
8277 optparse.py:472:29: E221 multiple spaces before operator
8378 optparse.py:544:21: W601 .has_key() is deprecated, use 'in'
8479
85- You can also make pep8 .py show the source code for each error, and
80+ You can also make pycodestyle .py show the source code for each error, and
8681even the relevant text from PEP 8::
8782
88- $ pep8 --show-source --show-pep8 testsuite/E40.py
83+ $ pycodestyle --show-source --show-pep8 testsuite/E40.py
8984 testsuite/E40.py:2:10: E401 multiple imports on one line
9085 import os, sys
9186 ^
@@ -97,7 +92,7 @@ even the relevant text from PEP 8::
9792
9893Or you can display how often each error was found::
9994
100- $ pep8 --statistics -qq Python-2.5/Lib
95+ $ pycodestyle --statistics -qq Python-2.5/Lib
10196 232 E201 whitespace after '['
10297 599 E202 whitespace before ')'
10398 631 E203 whitespace before ','
@@ -113,13 +108,13 @@ Or you can display how often each error was found::
113108
114109You can also make pep8.py show the error text in different formats by using --format having options default/pylint/custom::
115110
116- $ pep8 testsuite/E40.py --format=default
111+ $ pycodestyle testsuite/E40.py --format=default
117112 testsuite/E40.py:2:10: E401 multiple imports on one line
118113
119- $ pep8 testsuite/E40.py --format=pylint
114+ $ pycodestyle testsuite/E40.py --format=pylint
120115 testsuite/E40.py:2: [E401] multiple imports on one line
121116
122- $ pep8 testsuite/E40.py --format='%(path)s|%(row)d|%(col)d| %(code)s %(text)s'
117+ $ pycodestyle testsuite/E40.py --format='%(path)s|%(row)d|%(col)d| %(code)s %(text)s'
123118 testsuite/E40.py|2|10| E401 multiple imports on one line
124119
125120Variables in the ``custom `` format option
@@ -140,8 +135,8 @@ Variables in the ``custom`` format option
140135
141136Quick help is available on the command line::
142137
143- $ pep8 -h
144- Usage: pep8 [options] input ...
138+ $ pycodestyle -h
139+ Usage: pycodestyle [options] input ...
145140
146141 Options:
147142 --version show program's version number and exit
@@ -421,7 +416,7 @@ special comment. This possibility should be reserved for special cases.
421416
422417Note: most errors can be listed with such one-liner::
423418
424- $ python pep8 .py --first --select E,W testsuite/ --format '%(code)s: %(text)s'
419+ $ python pycodestyle .py --first --select E,W testsuite/ --format '%(code)s: %(text)s'
425420
426421
427422.. _related-tools :
@@ -430,9 +425,9 @@ Related tools
430425-------------
431426
432427The `flake8 checker <https://flake8.readthedocs.io >`_ is a wrapper around
433- ``pep8 `` and similar tools. It supports plugins.
428+ ``pycodestyle `` and similar tools. It supports plugins.
434429
435- Other tools which use ``pep8 `` are referenced in the Wiki: `list of related
430+ Other tools which use ``pycodestyle `` are referenced in the Wiki: `list of related
436431tools <https://github.com/pycqa/pycodestyle/wiki/RelatedTools> `_.
437432
438433.. _PEP 8 : http://www.python.org/dev/peps/pep-0008/
0 commit comments