summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt10
-rwxr-xr-xpep8.py5
-rw-r--r--testsuite/E22.py5
3 files changed, 18 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 479ba1f..7b77d65 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,9 +2,19 @@ Changelog
=========
+1.x (unreleased)
+----------------
+
+Bug fixes:
+
+* Fix regression with E22 checks and inline comments. (Issue #271)
+
+
1.5.4 (2014-04-07)
------------------
+Bug fixes:
+
* Fix negative offset with E303 before a multi-line docstring.
(Issue #269)
diff --git a/pep8.py b/pep8.py
index 4662cd7..9f4d7f3 100755
--- a/pep8.py
+++ b/pep8.py
@@ -46,7 +46,7 @@ W warnings
"""
from __future__ import with_statement
-__version__ = '1.5.4'
+__version__ = '1.5.5a0'
import os
import sys
@@ -90,6 +90,7 @@ WS_NEEDED_OPERATORS = frozenset([
WHITESPACE = frozenset(' \t')
SKIP_TOKENS = frozenset([tokenize.NL, tokenize.NEWLINE,
tokenize.INDENT, tokenize.DEDENT])
+SKIP_TOKENS_C = SKIP_TOKENS.union([tokenize.COMMENT])
BENCHMARK_KEYS = ['directories', 'files', 'logical lines', 'physical lines']
INDENT_REGEX = re.compile(r'([ \t]*)')
@@ -702,7 +703,7 @@ def missing_whitespace_around_operator(logical_line, tokens):
elif prev_type == tokenize.NAME:
binary_usage = (prev_text not in KEYWORDS)
else:
- binary_usage = (prev_type not in SKIP_TOKENS)
+ binary_usage = (prev_type not in SKIP_TOKENS_C)
if binary_usage:
need_space = None
diff --git a/testsuite/E22.py b/testsuite/E22.py
index 2ff470b..7617eb8 100644
--- a/testsuite/E22.py
+++ b/testsuite/E22.py
@@ -149,4 +149,9 @@ if alpha[:-i]:
def squares(n):
return (i ** 2 for i in range(n))
+
+ENG_PREFIXES = {
+ -6: "\u03bc", # Greek letter mu
+ -3: "m",
+}
#: