diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2012-12-22 00:28:12 +0100 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2012-12-22 00:28:12 +0100 |
commit | 6cd56b573108b39ea1751dd06dd56c0e8f10a7c7 (patch) | |
tree | d11b8635723f838ac02ec48e1a55c5da5d72fecc /README.rst | |
parent | 272571d14c2c07cf3008ab59782c554a1344ee3f (diff) | |
download | pep8-6cd56b573108b39ea1751dd06dd56c0e8f10a7c7.tar.gz |
Add Sphinx documentation
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 37 |
1 files changed, 0 insertions, 37 deletions
@@ -7,11 +7,6 @@ conventions in `PEP 8`_. .. _PEP 8: http://www.python.org/dev/peps/pep-0008/ -Mailing List ------------- -http://groups.google.com/group/pep8 - - Features -------- @@ -123,38 +118,6 @@ Quick help is available on the command line:: --config=path config file location (default: /home/user/.config/pep8) -Calling `pep8` from Python --------------------------- - -You can also execute `pep8` tests from Python code. For example, this -can be highly useful for automated testing of coding style conformance -in your project:: - - import unittest - import pep8 - - - class TestCodeFormat(unittest.TestCase): - - def test_pep8_conformance(self): - """Test that we conform to PEP8.""" - pep8style = pep8.StyleGuide(quiet=True) - result = pep8style.check_files(['file1.py', 'file2.py']) - self.assertEqual(result.total_errors, 0, - "Found code style errors (and warnings).") - -If you are using `nosetests` for running tests, remove `quiet=True` -since Nose suppresses stdout. - -There's also a shortcut for checking a single file:: - - import pep8 - - fchecker = pep8.Checker('testsuite/E27.py', show_source=True) - file_errors = fchecker.check_all() - - print("Found %s errors (and warnings)" % file_errors) - Feedback -------- |