Skip to content

Commit c8e21b5

Browse files
committed
Fixed #287 -- 'variable is referenced before assignment' error
Thanks to @dreadatour for the original pull request.
1 parent d8786cf commit c8e21b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pep8.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ def continued_indentation(logical_line, tokens, indent_level, hang_closing,
435435
indent_chances = {}
436436
last_indent = tokens[0][2]
437437
visual_indent = None
438+
last_token_multiline = False
438439
# for each depth, memorize the visual indent column
439440
indent = [last_indent[1]]
440441
if verbose >= 3:
@@ -978,6 +979,7 @@ def explicit_line_join(logical_line, tokens):
978979
"""
979980
prev_start = prev_end = parens = 0
980981
comment = False
982+
backslash = None
981983
for token_type, text, start, end, line in tokens:
982984
if token_type == tokenize.COMMENT:
983985
comment = True

0 commit comments

Comments
 (0)