mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 02:20:11 +01:00
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:
parent
dd75edb429
commit
44e9d65757
1 changed files with 53 additions and 54 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue