summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lee <IanLee1521@gmail.com>2014-12-13 14:46:26 -0800
committerIan Lee <IanLee1521@gmail.com>2014-12-13 14:46:26 -0800
commitd0bc5b7de4c5cb590f33b735e1d5671b18af9a08 (patch)
treea1b3990d869f67b42678af8c782bc548dbe13809
parent144a4d09927f421a5bb5968190c35fa8ae189d41 (diff)
parent6b29bab2b1afe5188b9334f75fd7d4078381d9b9 (diff)
downloadpep8-d0bc5b7de4c5cb590f33b735e1d5671b18af9a08.tar.gz
Merge pull request #310 from ilam/featuredoc
Looks good, thanks @ilam
-rw-r--r--docs/intro.rst27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/intro.rst b/docs/intro.rst
index 5e3af1f..59c42ab 100644
--- a/docs/intro.rst
+++ b/docs/intro.rst
@@ -111,6 +111,33 @@ Or you can display how often each error was found::
612 W601 .has_key() is deprecated, use 'in'
1188 W602 deprecated form of raising exception
+You can also make pep8.py show the error text in different formats by using --format having options default/pylint/custom::
+
+ $ pep8 testsuite/E40.py --format=default
+ testsuite/E40.py:2:10: E401 multiple imports on one line
+
+ $ pep8 testsuite/E40.py --format=pylint
+ testsuite/E40.py:2: [E401] multiple imports on one line
+
+ $ pep8 testsuite/E40.py --format='%(path)s|%(row)d|%(col)d| %(code)s %(text)s'
+ testsuite/E40.py|2|10| E401 multiple imports on one line
+
+Variables in the ``custom`` format option
+
++----------------+------------------+
+| **Variable** | **Significance** |
++================+==================+
+| ``path`` | File name |
++----------------+------------------+
+| ``row`` | Row number |
++----------------+------------------+
+| ``col`` | Column number |
++----------------+------------------+
+| ``code`` | Error code |
++----------------+------------------+
+| ``text`` | Error text |
++----------------+------------------+
+
Quick help is available on the command line::
$ pep8 -h