Skip to content

Commit

Permalink
Fix E225: accept print >>sys.stderr, "..." syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
florentx committed Sep 10, 2010
1 parent 197d0f5 commit 921b22e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Expand Up @@ -5,6 +5,8 @@ Changelog
0.5.1 (unreleased)
------------------

* Fix E225: accept ``print >>sys.stderr, "..."`` syntax.

* Fix E501 for lines containing multibyte encoded characters. (Issue #7)

* Fix E221, E222, E223, E224 not detected in some cases. (Issue #16)
Expand Down
6 changes: 3 additions & 3 deletions pep8.py
Expand Up @@ -128,9 +128,9 @@ def blank_lines(logical_line, blank_lines, indent_level, line_number)
WHITESPACE = ' \t'

BINARY_OPERATORS = frozenset(['**=', '*=', '+=', '-=', '!=', '<>',
'%=', '^=', '&=', '|=', '==', '/=', '//=', '>=', '<=', '>>=', '<<=',
'%', '^', '&', '|', '=', '/', '//', '>', '<', '>>', '<<'])
UNARY_OPERATORS = frozenset(['**', '*', '+', '-'])
'%=', '^=', '&=', '|=', '==', '/=', '//=', '<=', '>=', '<<=', '>>=',
'%', '^', '&', '|', '=', '/', '//', '<', '>', '<<'])
UNARY_OPERATORS = frozenset(['>>', '**', '*', '+', '-'])
OPERATORS = BINARY_OPERATORS | UNARY_OPERATORS
SKIP_TOKENS = frozenset([tokenize.COMMENT, tokenize.NL, tokenize.INDENT,
tokenize.DEDENT, tokenize.NEWLINE])
Expand Down
2 changes: 2 additions & 0 deletions testsuite/E225i.py
@@ -0,0 +1,2 @@
_1MB = 2 ** 20
_1kB = _1MB >>10
3 changes: 2 additions & 1 deletion testsuite/E225not.py
Expand Up @@ -11,4 +11,5 @@
lambda *args, **kw: (args, kw)
lambda a, b=h[:], c=0: (a, b, c)
if not -5 < x < +5:
print >> sys.stderr, "x is out of range."
print >>sys.stderr, "x is out of range."
print >> sys.stdout, "x is an integer."

0 comments on commit 921b22e

Please sign in to comment.