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:
committed by
Marge Bot
parent
3f99ff8a0e
commit
4d9acfa533
@@ -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))
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user