diff options
author | Ian Lee <IanLee1521@gmail.com> | 2014-12-22 22:15:01 -0800 |
---|---|---|
committer | Ian Lee <IanLee1521@gmail.com> | 2014-12-22 22:15:01 -0800 |
commit | a21598e67abeb557f85855cdc04106c7c212f09b (patch) | |
tree | 0c4f424f088d185cdeca110e1ef8ed9657dfa39e | |
parent | 96ddf8c25f053a9d7ced73b194d8558c90069319 (diff) | |
parent | 2e540a1d8c623b99b35c444649848a40c2f2c95c (diff) | |
download | pep8-a21598e67abeb557f85855cdc04106c7c212f09b.tar.gz |
Merge pull request #360 from jcrocholl/issue-316
Add E121 and E126 to the DEFAULT_IGNORE list
-rw-r--r-- | CHANGES.txt | 2 | ||||
-rw-r--r-- | docs/intro.rst | 18 | ||||
-rwxr-xr-x | pep8.py | 2 | ||||
-rw-r--r-- | testsuite/test_api.py | 5 |
4 files changed, 16 insertions, 11 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index d0ae802..774a90d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -32,6 +32,8 @@ Changes: * Add ``.tox/`` to default excludes. (Issue #335) +* Do not report E121 or E126 in the default configuration. (Issues #256 / #316) + Bug fixes: * Don't crash if Checker.build_tokens_line() returns None. (Issue #306) diff --git a/docs/intro.rst b/docs/intro.rst index 8d56add..b5e3971 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -228,7 +228,7 @@ This is the current list of error and warning codes: | E116 | unexpected indentation (comment) | +----------+----------------------------------------------------------------------+ +----------+----------------------------------------------------------------------+ -| E121 (^) | continuation line under-indented for hanging indent | +| E121 (*^)| continuation line under-indented for hanging indent | +----------+----------------------------------------------------------------------+ | E122 (^) | continuation line missing indentation or outdented | +----------+----------------------------------------------------------------------+ @@ -238,7 +238,7 @@ This is the current list of error and warning codes: +----------+----------------------------------------------------------------------+ | E125 (^) | continuation line with same indent as next logical line | +----------+----------------------------------------------------------------------+ -| E126 (^) | continuation line over-indented for hanging indent | +| E126 (*^)| continuation line over-indented for hanging indent | +----------+----------------------------------------------------------------------+ | E127 (^) | continuation line over-indented for visual indent | +----------+----------------------------------------------------------------------+ @@ -395,11 +395,11 @@ This is the current list of error and warning codes: +----------+----------------------------------------------------------------------+ -**(*)** In the default configuration, the checks **E123**, **E133**, **E226**, -**E241**, **E242** and **E704** are ignored because they are not rules unanimously -accepted, and `PEP 8`_ does not enforce them. The check **E133** is mutually -exclusive with check **E123**. Use switch ``--hang-closing`` to report **E133** -instead of **E123**. +**(*)** In the default configuration, the checks **E121**, **E123**, **E126**, +**E133**, **E226**, **E241**, **E242** and **E704** are ignored because they +are not rules unanimously accepted, and `PEP 8`_ does not enforce them. The +check **E133** is mutually exclusive with check **E123**. Use switch ``--hang- +closing`` to report **E133** instead of **E123**. **(^)** These checks can be disabled at the line level using the ``# noqa`` special comment. This possibility should be reserved for special cases. @@ -420,7 +420,7 @@ Related tools The `flake8 checker <https://flake8.readthedocs.org>`_ is a wrapper around ``pep8`` and similar tools. It supports plugins. -Other tools which use ``pep8`` are referenced in the Wiki: `list of related tools -<https://github.com/jcrocholl/pep8/wiki/RelatedTools>`_. +Other tools which use ``pep8`` are referenced in the Wiki: `list of related +tools <https://github.com/jcrocholl/pep8/wiki/RelatedTools>`_. .. _PEP 8: http://www.python.org/dev/peps/pep-0008/ @@ -65,7 +65,7 @@ except ImportError: __version__ = '1.6.0a0' DEFAULT_EXCLUDE = '.svn,CVS,.bzr,.hg,.git,__pycache__,.tox' -DEFAULT_IGNORE = 'E123,E226,E24,E704' +DEFAULT_IGNORE = 'E121,E123,E126,E226,E24,E704' try: if sys.platform == 'win32': DEFAULT_CONFIG = os.path.expanduser(r'~\.pep8') diff --git a/testsuite/test_api.py b/testsuite/test_api.py index de7bc7b..341fb34 100644 --- a/testsuite/test_api.py +++ b/testsuite/test_api.py @@ -179,7 +179,10 @@ class APITestCase(unittest.TestCase): options = parse_argv('').options self.assertEqual(options.select, ()) - self.assertEqual(options.ignore, ('E123', 'E226', 'E24', 'E704')) + self.assertEqual( + options.ignore, + ('E121', 'E123', 'E126', 'E226', 'E24', 'E704') + ) options = parse_argv('--doctest').options self.assertEqual(options.select, ()) |