Skip to content

Commit a21598e

Browse files
committed
Merge pull request #360 from jcrocholl/issue-316
Add E121 and E126 to the DEFAULT_IGNORE list
2 parents 96ddf8c + 2e540a1 commit a21598e

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Changes:
3232

3333
* Add ``.tox/`` to default excludes. (Issue #335)
3434

35+
* Do not report E121 or E126 in the default configuration. (Issues #256 / #316)
36+
3537
Bug fixes:
3638

3739
* Don't crash if Checker.build_tokens_line() returns None. (Issue #306)

docs/intro.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ This is the current list of error and warning codes:
228228
| E116 | unexpected indentation (comment) |
229229
+----------+----------------------------------------------------------------------+
230230
+----------+----------------------------------------------------------------------+
231-
| E121 (^) | continuation line under-indented for hanging indent |
231+
| E121 (*^)| continuation line under-indented for hanging indent |
232232
+----------+----------------------------------------------------------------------+
233233
| E122 (^) | continuation line missing indentation or outdented |
234234
+----------+----------------------------------------------------------------------+
@@ -238,7 +238,7 @@ This is the current list of error and warning codes:
238238
+----------+----------------------------------------------------------------------+
239239
| E125 (^) | continuation line with same indent as next logical line |
240240
+----------+----------------------------------------------------------------------+
241-
| E126 (^) | continuation line over-indented for hanging indent |
241+
| E126 (*^)| continuation line over-indented for hanging indent |
242242
+----------+----------------------------------------------------------------------+
243243
| E127 (^) | continuation line over-indented for visual indent |
244244
+----------+----------------------------------------------------------------------+
@@ -395,11 +395,11 @@ This is the current list of error and warning codes:
395395
+----------+----------------------------------------------------------------------+
396396

397397

398-
**(*)** In the default configuration, the checks **E123**, **E133**, **E226**,
399-
**E241**, **E242** and **E704** are ignored because they are not rules unanimously
400-
accepted, and `PEP 8`_ does not enforce them. The check **E133** is mutually
401-
exclusive with check **E123**. Use switch ``--hang-closing`` to report **E133**
402-
instead of **E123**.
398+
**(*)** In the default configuration, the checks **E121**, **E123**, **E126**,
399+
**E133**, **E226**, **E241**, **E242** and **E704** are ignored because they
400+
are not rules unanimously accepted, and `PEP 8`_ does not enforce them. The
401+
check **E133** is mutually exclusive with check **E123**. Use switch ``--hang-
402+
closing`` to report **E133** instead of **E123**.
403403

404404
**(^)** These checks can be disabled at the line level using the ``# noqa``
405405
special comment. This possibility should be reserved for special cases.
@@ -420,7 +420,7 @@ Related tools
420420
The `flake8 checker <https://flake8.readthedocs.org>`_ is a wrapper around
421421
``pep8`` and similar tools. It supports plugins.
422422

423-
Other tools which use ``pep8`` are referenced in the Wiki: `list of related tools
424-
<https://github.com/jcrocholl/pep8/wiki/RelatedTools>`_.
423+
Other tools which use ``pep8`` are referenced in the Wiki: `list of related
424+
tools <https://github.com/jcrocholl/pep8/wiki/RelatedTools>`_.
425425

426426
.. _PEP 8: http://www.python.org/dev/peps/pep-0008/

pep8.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
__version__ = '1.6.0a0'
6666

6767
DEFAULT_EXCLUDE = '.svn,CVS,.bzr,.hg,.git,__pycache__,.tox'
68-
DEFAULT_IGNORE = 'E123,E226,E24,E704'
68+
DEFAULT_IGNORE = 'E121,E123,E126,E226,E24,E704'
6969
try:
7070
if sys.platform == 'win32':
7171
DEFAULT_CONFIG = os.path.expanduser(r'~\.pep8')

testsuite/test_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,10 @@ def parse_argv(argstring):
179179

180180
options = parse_argv('').options
181181
self.assertEqual(options.select, ())
182-
self.assertEqual(options.ignore, ('E123', 'E226', 'E24', 'E704'))
182+
self.assertEqual(
183+
options.ignore,
184+
('E121', 'E123', 'E126', 'E226', 'E24', 'E704')
185+
)
183186

184187
options = parse_argv('--doctest').options
185188
self.assertEqual(options.select, ())

0 commit comments

Comments
 (0)