summaryrefslogtreecommitdiff
path: root/pep8.py
diff options
context:
space:
mode:
Diffstat (limited to 'pep8.py')
-rwxr-xr-xpep8.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pep8.py b/pep8.py
index d638388..0fbe22d 100755
--- a/pep8.py
+++ b/pep8.py
@@ -1346,6 +1346,10 @@ class Checker(object):
"""Build a line from tokens and run all logical checks on it."""
self.report.increment_logical_line()
mapping = self.build_tokens_line()
+
+ if not mapping:
+ return
+
(start_row, start_col) = mapping[0][1]
start_line = self.lines[start_row - 1]
self.indent_level = expand_indent(start_line[:start_col])