clean up .format_code() usage in .load_as_string() method of UtilityCodeBase
authorStefan Behnel <stefan_ml@behnel.de>
Sat, 25 Aug 2012 22:44:41 +0000 (00:44 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Sat, 25 Aug 2012 22:44:41 +0000 (00:44 +0200)
Cython/Compiler/Code.py

index 6a55b4c..8f8ec21 100644 (file)
@@ -269,10 +269,9 @@ class UtilityCodeBase(object):
         """
         util = cls.load(util_code_name, from_file, **kwargs)
         proto, impl = util.proto, util.impl
-        return cls.format_code(proto), cls.format_code(impl)
+        return util.format_code(proto), util.format_code(impl)
 
-    @staticmethod
-    def format_code(code_string, replace_empty_lines=re.compile(r'\n\n+').sub):
+    def format_code(self, code_string, replace_empty_lines=re.compile(r'\n\n+').sub):
         """
         Format a code section for output.
         """