intel/isl/format: Dedent the template in gen_format_layout.py

This makes it much easier to edit the template and doesn't really dirty
the python all that much.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
Jason Ekstrand 2017-06-22 11:27:04 -07:00
parent dd75edb429
commit 44e9d65757

View file

@ -32,8 +32,9 @@ from mako import template
# Load the template, ensure that __future__.division is imported, and set the
# bytes encoding to be utf-8. This last bit is important to getting simple
# consistent behavior for python 3 when we get there.
TEMPLATE = template.Template(
text=textwrap.dedent("""\
TEMPLATE = template.Template(future_imports=['division'],
output_encoding='utf-8',
text="""\
/* This file is autogenerated by gen_format_layout.py. DO NOT EDIT! */
/*
@ -87,9 +88,7 @@ TEMPLATE = template.Template(
% endfor
};
"""),
future_imports=['division'],
output_encoding='utf-8')
""")
class Channel(object):