Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2beb413

Browse files
committed
Merged revisions 66473 via svnmerge from
svn+ssh://[email protected]/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://[email protected]/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 ........ ................
1 parent d62269f commit 2beb413

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Lib/lib2to3/fixes/fix_metaclass.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
"""
1818
# Author: Jack Diederich
1919

20-
import os
21-
2220
# Local imports
2321
from .. import fixer_base
2422
from ..pygram import token
@@ -216,12 +214,12 @@ def transform(self, node, results):
216214
pass_leaf = Leaf(text_type, 'pass')
217215
pass_leaf.set_prefix(orig_meta_prefix)
218216
node.append_child(pass_leaf)
219-
node.append_child(Leaf(token.NEWLINE, os.linesep))
217+
node.append_child(Leaf(token.NEWLINE, '\n'))
220218

221219
elif len(suite.children) > 1 and \
222220
(suite.children[-2].type == token.INDENT and
223221
suite.children[-1].type == token.DEDENT):
224222
# there was only one line in the class body and it was __metaclass__
225223
pass_leaf = Leaf(text_type, 'pass')
226224
suite.insert_child(-1, pass_leaf)
227-
suite.insert_child(-1, Leaf(token.NEWLINE, os.linesep))
225+
suite.insert_child(-1, Leaf(token.NEWLINE, '\n'))

0 commit comments

Comments
 (0)