summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2014-05-29 19:57:51 +0200
committerFlorent Xicluna <florent.xicluna@gmail.com>2014-05-29 19:57:51 +0200
commit4c5bf00cb613be617c7f48d3b2b82a1c7b895ac1 (patch)
tree6201d93d292df1e0c2ead7aca926390af60edb2d
parent999e3357c73a48fea6df8a772435af696b3f01c0 (diff)
downloadpep8-4c5bf00cb613be617c7f48d3b2b82a1c7b895ac1.tar.gz
Do not report E704 in the default configuration; issue #277
-rw-r--r--CHANGES.txt5
-rw-r--r--docs/intro.rst4
-rwxr-xr-xpep8.py2
-rw-r--r--testsuite/test_api.py2
4 files changed, 7 insertions, 6 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index e18add4..4bcfcf7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,10 +7,11 @@ Changelog
* Report E731 for lambda assignment. (Issue #277)
-* Report E704 for one-liner def instead of E701. (Issue #277)
+* Report E704 for one-liner def instead of E701.
+ Do not report this error in the default configuration. (Issue #277)
* Replace codes E111, E112 and E113 with codes E114, E115 and E116
- for wrong indentation of comments. (Issue #274)
+ for bad indentation of comments. (Issue #274)
* Report E266 instead of E265 when the block comment starts with
multiple ``#``. (Issue #270)
diff --git a/docs/intro.rst b/docs/intro.rst
index 88f0000..5e3af1f 100644
--- a/docs/intro.rst
+++ b/docs/intro.rst
@@ -313,7 +313,7 @@ This is the current list of error and warning codes:
+----------+----------------------------------------------------------------------+
| E703 | statement ends with a semicolon |
+----------+----------------------------------------------------------------------+
-| E704 | multiple statements on one line (def) |
+| E704 (*) | multiple statements on one line (def) |
+----------+----------------------------------------------------------------------+
| E711 (^) | comparison to None should be 'if cond is None:' |
+----------+----------------------------------------------------------------------+
@@ -367,7 +367,7 @@ This is the current list of error and warning codes:
**(*)** In the default configuration, the checks **E123**, **E133**, **E226**,
-**E241** and **E242** are ignored because they are not rules unanimously
+**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**.
diff --git a/pep8.py b/pep8.py
index b64dfda..b31a978 100755
--- a/pep8.py
+++ b/pep8.py
@@ -64,7 +64,7 @@ except ImportError:
from ConfigParser import RawConfigParser
DEFAULT_EXCLUDE = '.svn,CVS,.bzr,.hg,.git,__pycache__'
-DEFAULT_IGNORE = 'E123,E226,E24'
+DEFAULT_IGNORE = 'E123,E226,E24,E704'
if sys.platform == 'win32':
DEFAULT_CONFIG = os.path.expanduser(r'~\.pep8')
else:
diff --git a/testsuite/test_api.py b/testsuite/test_api.py
index 980fe9e..672f202 100644
--- a/testsuite/test_api.py
+++ b/testsuite/test_api.py
@@ -178,7 +178,7 @@ class APITestCase(unittest.TestCase):
options = parse_argv('').options
self.assertEqual(options.select, ())
- self.assertEqual(options.ignore, ('E123', 'E226', 'E24'))
+ self.assertEqual(options.ignore, ('E123', 'E226', 'E24', 'E704'))
options = parse_argv('--doctest').options
self.assertEqual(options.select, ())