summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2014-04-05 07:55:35 +0200
committerFlorent Xicluna <florent.xicluna@gmail.com>2014-04-05 07:55:35 +0200
commit20d939b22daf8819731748eb1f7149c87e320102 (patch)
tree5f08cbea7f0c812008a25a8b66845a9f03cb4661
parent310746ed7ad69c9b294ad3967e5dd5c19f91b9b9 (diff)
downloadpep8-20d939b22daf8819731748eb1f7149c87e320102.tar.gz
Back to development
-rwxr-xr-xpep8.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/pep8.py b/pep8.py
index dbe6bda..ce80fb1 100755
--- a/pep8.py
+++ b/pep8.py
@@ -46,7 +46,7 @@ W warnings
"""
from __future__ import with_statement
-__version__ = '1.5.3'
+__version__ = '1.5.4a0'
import os
import sys
@@ -1348,17 +1348,13 @@ class Checker(object):
for name, check, argument_names in self._logical_checks:
if self.verbose >= 4:
print(' ' + name)
- for result in self.run_check(check, argument_names) or ():
- (offset, text) = result
- if isinstance(offset, tuple):
- (li_number, li_offset) = offset
- else:
- for (token_offset, token) in mapping:
+ for offset, text in self.run_check(check, argument_names) or ():
+ if not isinstance(offset, tuple):
+ for token_offset, token in mapping:
if offset <= token_offset:
break
- li_number = token[3][0]
- li_offset = (token[3][1] + offset - token_offset)
- self.report_error(li_number, li_offset, text, check)
+ offset = (token[3][0], token[3][1] + offset - token_offset)
+ self.report_error(offset[0], offset[1], text, check)
if self.logical_line:
self.previous_indent_level = self.indent_level
self.previous_logical = self.logical_line