Commits

Anonymous committed c14c5e1

Removed unicode character literals.

  • Participants
  • Parent commits 63a5dcd

Comments (0)

Files changed (5)

lib3to2/fixes/fix_metaclass.py

                         item.insert_child(loc, stmt_node)
                         break
         if right_ind - left_ind == 1:
-            node.insert_child(left_ind + 1, Name(u"object"))
+            node.insert_child(left_ind + 1, Name("object"))

lib3to2/fixes/fix_newstyle.py

 
 class FixNewstyle(fixer_base.BaseFix):
 
-    PATTERN = u"classdef< 'class' NAME [paren='('] [')'] colon=':' any >"
+    PATTERN = "classdef< 'class' NAME [paren='('] [')'] colon=':' any >"
 
     def transform(self, node, results):
         if 'paren' in results:
-            paren = results[u'paren']
+            paren = results['paren']
             idx = node.children.index(paren)
-            node.insert_child(idx + 1, Name(u"object"))
+            node.insert_child(idx + 1, Name("object"))
         else:
-            colon = results[u'colon']
+            colon = results['colon']
             idx = node.children.index(colon)
             insert_object(node, idx)
         

lib3to2/fixes/fix_super.py

         class_node = Node(syms.power, [Name(name), dot_class.clone()])
 
     idx = parent.children.index(rparen)
-    parent.insert_child(idx, Name(name, prefix=u" "))
+    parent.insert_child(idx, Name(name, prefix=" "))
     parent.insert_child(idx, Comma())
     parent.insert_child(idx, class_node)
 
 
 class FixSuper(fixer_base.BaseFix):
 
-    PATTERN = u"power< 'super' trailer< '(' rparen=')' > any* >"
+    PATTERN = "power< 'super' trailer< '(' rparen=')' > any* >"
 
     def transform(self, node, results):
         param = get_firstparam(node)
         if param is None:
-            self.cannot_convert(node, u"super() with no arguments must be called inside a function that has at least one parameter")
+            self.cannot_convert(node, "super() with no arguments must be called inside a function that has at least one parameter")
             return
         class_name = get_class_name(node)
-        rparen = results[u"rparen"]
+        rparen = results["rparen"]
         insert_args(param, class_name, rparen)

lib3to2/tests/test_metaclass.py

     fixer = u'metaclass'
 
     def test_unchanged(self):
-        self.unchanged(u"class X(): pass")
-        self.unchanged(u"class X(object): pass")
-        self.unchanged(u"class X(object1, object2): pass")
-        self.unchanged(u"class X(object1, object2, object3): pass")
+        self.unchanged("class X(): pass")
+        self.unchanged("class X(object): pass")
+        self.unchanged("class X(object1, object2): pass")
+        self.unchanged("class X(object1, object2, object3): pass")
 
-        s = u"""
+        s = """
         class X():
             def __metaclass__(self): pass
         """
         self.unchanged(s)
 
-        s = u"""
+        s = """
         class X():
             a[23] = 74
         """
         self.unchanged(s)
 
     def test_comments(self):
-        a = u"""
+        a = """
         class X(object):
             # hi
             __metaclass__ = AppleMeta
             pass
         """
-        b = u"""
+        b = """
         class X(metaclass=AppleMeta):
             # hi
             pass
         """
         self.check(b, a)
 
-        a = u"""
+        a = """
         class X(object):
             __metaclass__ = Meta
             pass
             # Bedtime!
         """
-        b = u"""
+        b = """
         class X(metaclass=Meta):
             pass
             # Bedtime!
 
     def test_meta_noparent_odd_body(self):
         # no-parent class, odd body
-        a = u"""
+        a = """
         class X(object):
             __metaclass__ = Q
             pass
         """
-        b = u"""
+        b = """
         class X(metaclass=Q):
             pass
         """
 
     def test_meta_oneparent_no_body(self):
         # one parent class, no body
-        a = u"""
+        a = """
         class X(object):
             __metaclass__ = Q
             pass"""
-        b = u"""
+        b = """
         class X(object, metaclass=Q): pass"""
         self.check(b, a)
 
     def test_meta_oneparent_simple_body_1(self):
         # one parent, simple body
-        a = u"""
+        a = """
         class X(object):
             __metaclass__ = Meta
             bar = 7
         """
-        b = u"""
+        b = """
         class X(object, metaclass=Meta):
             bar = 7
         """
         self.check(b, a)
 
     def test_meta_oneparent_simple_body_2(self):
-        a = u"""
+        a = """
         class X(object):
             __metaclass__ = Meta
             x = 4; g = 23
         """
-        b = u"""
+        b = """
         class X(metaclass=Meta):
             x = 4; g = 23
         """
         self.check(b, a)
 
     def test_meta_oneparent_simple_body_3(self):
-        a = u"""
+        a = """
         class X(object):
             __metaclass__ = Meta
             bar = 7
         """
-        b = u"""
+        b = """
         class X(object, metaclass=Meta):
             bar = 7
         """
 
     def test_meta_multiparent_simple_body_1(self):
         # multiple inheritance, simple body
-        a = u"""
+        a = """
         class X(clsA, clsB):
             __metaclass__ = Meta
             bar = 7
         """
-        b = u"""
+        b = """
         class X(clsA, clsB, metaclass=Meta):
             bar = 7
         """
 
     def test_meta_multiparent_simple_body_2(self):
         # keywords in the class statement
-        a = u"""
+        a = """
         class m(a, arg=23):
             __metaclass__ = Meta
             pass"""
-        b = u"""
+        b = """
         class m(a, arg=23, metaclass=Meta):
             pass"""
         self.check(b, a)
 
     def test_meta_expression_simple_body_1(self):
-        a = u"""
+        a = """
         class X(expression(2 + 4)):
             __metaclass__ = Meta
             pass
         """
-        b = u"""
+        b = """
         class X(expression(2 + 4), metaclass=Meta):
             pass
         """
         self.check(b, a)
 
     def test_meta_expression_simple_body_2(self):
-        a = u"""
+        a = """
         class X(expression(2 + 4), x**4):
             __metaclass__ = Meta
             pass
         """
-        b = u"""
+        b = """
         class X(expression(2 + 4), x**4, metaclass=Meta):
             pass
         """
 
     def test_meta_noparent_simple_body(self):
 
-        a = u"""
+        a = """
         class X(object):
             __metaclass__ = Meta
             save.py = 23
             out = 5
         """
-        b = u"""
+        b = """
         class X(metaclass=Meta):
             save.py = 23
             out = 5

lib3to2/tests/test_newstyle.py

 from lib3to2.tests.support import lib3to2FixerTestCase
 
 class Test_newstyle(lib3to2FixerTestCase):
-    fixer = u"newstyle"
+    fixer = "newstyle"
 
     def test_oneline(self):
 
-        b = u"""class Foo: pass"""
-        a = u"""class Foo(object): pass"""
+        b = """class Foo: pass"""
+        a = """class Foo(object): pass"""
         self.check(b, a)
 
     def test_suite(self):
 
-        b = u"""
+        b = """
         class Foo():
             do_stuff()"""
-        a = u"""
+        a = """
         class Foo(object):
             do_stuff()"""
         self.check(b, a)