python: drop explicit output_encoding='utf-8' in mako templates

Python 3 handles unicode strings by default, so we can drop all that.

Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674>
This commit is contained in:
Eric Engestrom
2021-08-07 11:36:38 +01:00
committed by Marge Bot
parent 3f99ff8a0e
commit 4d9acfa533
12 changed files with 31 additions and 34 deletions
+2 -2
View File
@@ -78,8 +78,8 @@ def main():
args = parser.parse_args()
path = os.path.join(args.outdir, 'nir_intrinsics.c')
with open(path, 'wb') as f:
f.write(Template(template, output_encoding='utf-8').render(
with open(path, 'w') as f:
f.write(Template(template).render(
INTR_OPCODES=INTR_OPCODES, INTR_INDICES=INTR_INDICES,
reduce=reduce, operator=operator))
+2 -2
View File
@@ -61,8 +61,8 @@ def main():
args = parser.parse_args()
path = os.path.join(args.outdir, 'nir_intrinsics.h')
with open(path, 'wb') as f:
f.write(Template(template, output_encoding='utf-8').render(INTR_OPCODES=INTR_OPCODES, INTR_INDICES=INTR_INDICES))
with open(path, 'w') as f:
f.write(Template(template).render(INTR_OPCODES=INTR_OPCODES, INTR_INDICES=INTR_INDICES))
if __name__ == '__main__':
main()
+2 -2
View File
@@ -86,8 +86,8 @@ def main():
args = parser.parse_args()
path = os.path.join(args.outdir, 'nir_intrinsics_indices.h')
with open(path, 'wb') as f:
f.write(Template(template, output_encoding='utf-8').render(INTR_INDICES=INTR_INDICES))
with open(path, 'w') as f:
f.write(Template(template).render(INTR_INDICES=INTR_INDICES))
if __name__ == '__main__':
main()