Commit 12bed2b0 authored by Stefan Behnel's avatar Stefan Behnel

delete blank lines from memoryview utility code

parent 2b232cde
......@@ -269,9 +269,10 @@ class UtilityCodeBase(object):
"""
util = cls.load(util_code_name, from_file, **kwargs)
proto, impl = util.proto, util.impl
return proto and proto.lstrip(), impl and impl.lstrip()
return cls.format_code(proto), cls.format_code(impl)
def format_code(self, code_string, replace_empty_lines=re.compile(r'\n\n+').sub):
@staticmethod
def format_code(code_string, replace_empty_lines=re.compile(r'\n\n+').sub):
"""
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