From 974748fd9a0ecdd494cdc51aeb16c54d38256d58 Mon Sep 17 00:00:00 2001 From: Ian Lee Date: Wed, 17 Dec 2014 23:42:03 -0800 Subject: Update DEFAULT_IGNORE to add E121 & E126 per discussion in issues #256 #316 --- pep8.py | 2 +- testsuite/test_api.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pep8.py b/pep8.py index c8889b5..6c51733 100755 --- a/pep8.py +++ b/pep8.py @@ -65,7 +65,7 @@ except ImportError: from ConfigParser import RawConfigParser 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, ()) -- cgit v1.2.1 From fe6a8a813d616c9fa397b2fd5b967bf72378b09a Mon Sep 17 00:00:00 2001 From: Ian Lee Date: Thu, 18 Dec 2014 00:00:36 -0800 Subject: Update documentation to reflect changes to default; issues #356 #316 --- docs/intro.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/intro.rst b/docs/intro.rst index 1bcafe8..63a1fe6 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 `_ 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 -`_. +Other tools which use ``pep8`` are referenced in the Wiki: `list of related +tools `_. .. _PEP 8: http://www.python.org/dev/peps/pep-0008/ -- cgit v1.2.1 From 2e540a1d8c623b99b35c444649848a40c2f2c95c Mon Sep 17 00:00:00 2001 From: Ian Lee Date: Thu, 18 Dec 2014 00:29:51 -0800 Subject: Add entry to changelog. --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index c57bfd1..a1aacc9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -30,6 +30,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) -- cgit v1.2.1