summaryrefslogtreecommitdiff
path: root/pygments/lexers/_lua_builtins.py
diff options
context:
space:
mode:
authorJean Abou Samra <jean@abou-samra.fr>2023-01-30 03:11:54 +0100
committerGeorg Brandl <georg@python.org>2023-01-31 16:30:11 +0100
commitb69cae00b4a13cf306ec92d169b81c965a0865fc (patch)
treea6bef750d9fd875d56ddb50279d151dce58ffe3c /pygments/lexers/_lua_builtins.py
parent94566ea3bf85190f21cb347ef5df7e5033e43b0f (diff)
downloadpygments-git-b69cae00b4a13cf306ec92d169b81c965a0865fc.tar.gz
Fix lots of missing encoding="utf-8" parameters
Some of these are probably unnecessary (ASCII-only content), but it's easier not to think about it.
Diffstat (limited to 'pygments/lexers/_lua_builtins.py')
-rw-r--r--pygments/lexers/_lua_builtins.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/_lua_builtins.py b/pygments/lexers/_lua_builtins.py
index a31f6b3b..39d5d5ef 100644
--- a/pygments/lexers/_lua_builtins.py
+++ b/pygments/lexers/_lua_builtins.py
@@ -249,14 +249,14 @@ if __name__ == '__main__': # pragma: no cover
return 'basic'
def regenerate(filename, modules):
- with open(filename) as fp:
+ with open(filename, encoding='utf-8') as fp:
content = fp.read()
header = content[:content.find('MODULES = {')]
footer = content[content.find("if __name__ == '__main__':"):]
- with open(filename, 'w') as fp:
+ with open(filename, 'w', encoding='utf-8') as fp:
fp.write(header)
fp.write('MODULES = %s\n\n' % pprint.pformat(modules))
fp.write(footer)