Commit 8f0a8bf5 authored by Stefan Behnel's avatar Stefan Behnel

clean up .format_code() usage in .load_as_string() method of UtilityCodeBase

parent 7ce4db08
...@@ -269,10 +269,9 @@ class UtilityCodeBase(object): ...@@ -269,10 +269,9 @@ class UtilityCodeBase(object):
""" """
util = cls.load(util_code_name, from_file, **kwargs) util = cls.load(util_code_name, from_file, **kwargs)
proto, impl = util.proto, util.impl 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(self, code_string, replace_empty_lines=re.compile(r'\n\n+').sub):
def format_code(code_string, replace_empty_lines=re.compile(r'\n\n+').sub):
""" """
Format a code section for output. Format a code section for output.
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment