summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lee <IanLee1521@gmail.com>2015-02-07 16:53:23 -0800
committerIan Lee <IanLee1521@gmail.com>2015-02-07 16:53:23 -0800
commitc8e21b57496454e0552970f1b2468c2b58c4e718 (patch)
treef7a0a1ce4f57325bb374f6e313e81c3161e60f19
parentd8786cfb5141d1f5cc6afbf26e15ccc773e8934b (diff)
downloadpep8-c8e21b57496454e0552970f1b2468c2b58c4e718.tar.gz
Fixed #287 -- 'variable is referenced before assignment' error
Thanks to @dreadatour for the original pull request.
-rwxr-xr-xpep8.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pep8.py b/pep8.py
index b0a99ce..dad873e 100755
--- a/pep8.py
+++ b/pep8.py
@@ -435,6 +435,7 @@ def continued_indentation(logical_line, tokens, indent_level, hang_closing,
indent_chances = {}
last_indent = tokens[0][2]
visual_indent = None
+ last_token_multiline = False
# for each depth, memorize the visual indent column
indent = [last_indent[1]]
if verbose >= 3:
@@ -978,6 +979,7 @@ def explicit_line_join(logical_line, tokens):
"""
prev_start = prev_end = parens = 0
comment = False
+ backslash = None
for token_type, text, start, end, line in tokens:
if token_type == tokenize.COMMENT:
comment = True