mirror of
https://github.com/python/cpython.git
synced 2025-10-25 10:44:55 +00:00
Merged revisions 66473 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
................
r66473 | benjamin.peterson | 2008-09-15 18:55:01 -0500 (Mon, 15 Sep 2008) | 9 lines
Merged revisions 66470 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r66470 | benjamin.peterson | 2008-09-15 18:29:43 -0500 (Mon, 15 Sep 2008) | 1 line
don't use os.linesep for newlines; it breaks tests on windows
........
................
This commit is contained in:
parent
d62269f920
commit
2beb413784
1 changed files with 2 additions and 4 deletions
|
|
@ -17,8 +17,6 @@
|
|||
"""
|
||||
# Author: Jack Diederich
|
||||
|
||||
import os
|
||||
|
||||
# Local imports
|
||||
from .. import fixer_base
|
||||
from ..pygram import token
|
||||
|
|
@ -216,7 +214,7 @@ def transform(self, node, results):
|
|||
pass_leaf = Leaf(text_type, 'pass')
|
||||
pass_leaf.set_prefix(orig_meta_prefix)
|
||||
node.append_child(pass_leaf)
|
||||
node.append_child(Leaf(token.NEWLINE, os.linesep))
|
||||
node.append_child(Leaf(token.NEWLINE, '\n'))
|
||||
|
||||
elif len(suite.children) > 1 and \
|
||||
(suite.children[-2].type == token.INDENT and
|
||||
|
|
@ -224,4 +222,4 @@ def transform(self, node, results):
|
|||
# there was only one line in the class body and it was __metaclass__
|
||||
pass_leaf = Leaf(text_type, 'pass')
|
||||
suite.insert_child(-1, pass_leaf)
|
||||
suite.insert_child(-1, Leaf(token.NEWLINE, os.linesep))
|
||||
suite.insert_child(-1, Leaf(token.NEWLINE, '\n'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue