summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2014-03-27 12:00:03 +0100
committerFlorent Xicluna <florent.xicluna@gmail.com>2014-03-27 12:00:03 +0100
commit63dc46e93ac8dc32af437878f16dc7f524368917 (patch)
treea6dfae9377ac4ed7675e5c66b88b76ffddab5628
parentbbf35c8c2fb0d668089dfe7aba500c94510d353f (diff)
downloadpep8-63dc46e93ac8dc32af437878f16dc7f524368917.tar.gz
Fix a crash with E125 on multi-line strings; closes #263
-rw-r--r--CHANGES.txt6
-rwxr-xr-xpep8.py3
-rw-r--r--testsuite/E12.py4
3 files changed, 12 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 830554b..72a2573 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,12 @@ Changelog
=========
+1.5.x (unreleased)
+------------------
+
+* Fix a crash with E125 on multi-line strings. (Issue #263)
+
+
1.5 (2014-03-26)
----------------
diff --git a/pep8.py b/pep8.py
index 7625736..50f461f 100755
--- a/pep8.py
+++ b/pep8.py
@@ -45,7 +45,7 @@ W warnings
700 statements
900 syntax error
"""
-__version__ = '1.5.0'
+__version__ = '1.5.1a0'
import os
import sys
@@ -442,6 +442,7 @@ def continued_indentation(logical_line, tokens, indent_level, hang_closing,
# visual indents
indent_chances = {}
last_indent = tokens[0][2]
+ visual_indent = None
# for each depth, memorize the visual indent column
indent = [last_indent[1]]
if verbose >= 3:
diff --git a/testsuite/E12.py b/testsuite/E12.py
index ac42886..088c6f3 100644
--- a/testsuite/E12.py
+++ b/testsuite/E12.py
@@ -347,4 +347,8 @@ if True:
),
dict(name=token.undefined)
)]
+#: E125
+if ("""
+ """):
+ pass
#: