diff options
author | Jean Abou Samra <jean@abou-samra.fr> | 2023-01-30 03:11:54 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2023-01-31 16:30:11 +0100 |
commit | b69cae00b4a13cf306ec92d169b81c965a0865fc (patch) | |
tree | a6bef750d9fd875d56ddb50279d151dce58ffe3c /pygments/lexers/_postgres_builtins.py | |
parent | 94566ea3bf85190f21cb347ef5df7e5033e43b0f (diff) | |
download | pygments-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/_postgres_builtins.py')
-rw-r--r-- | pygments/lexers/_postgres_builtins.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/_postgres_builtins.py b/pygments/lexers/_postgres_builtins.py index 3305f845..a67cc825 100644 --- a/pygments/lexers/_postgres_builtins.py +++ b/pygments/lexers/_postgres_builtins.py @@ -665,7 +665,7 @@ if __name__ == '__main__': # pragma: no cover return dt def update_consts(filename, constname, content): - with open(filename) as f: + with open(filename, encoding='utf-8') as f: data = f.read() # Line to start/end inserting @@ -678,7 +678,7 @@ if __name__ == '__main__': # pragma: no cover new_block = format_lines(constname, content) data = data[:m.start()] + new_block + data[m.end():] - with open(filename, 'w', newline='\n') as f: + with open(filename, 'w', encoding='utf-8', newline='\n') as f: f.write(data) update_myself() |