summaryrefslogtreecommitdiff
path: root/doc
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 /doc
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 'doc')
-rw-r--r--doc/conf.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/conf.py b/doc/conf.py
index f42c3553..5eac25cc 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -236,7 +236,7 @@ def pg_context(app, pagename, templatename, ctx, event_arg):
ctx['lexers'] = sorted(pygments.lexers.get_all_lexers(plugins=False), key=lambda x: x[0].lower())
if pagename in ('styles', 'demo'):
- with open('examples/example.py') as f:
+ with open('examples/example.py', encoding='utf-8') as f:
html = f.read()
lexer = pygments.lexers.get_lexer_for_filename('example.py')
min_contrasts = test_contrasts.min_contrasts()
@@ -273,7 +273,7 @@ def pg_context(app, pagename, templatename, ctx, event_arg):
def source_read(app, docname, source):
# linkify issue / PR numbers in changelog
if docname == 'docs/changelog':
- with open('../CHANGES') as f:
+ with open('../CHANGES', encoding='utf-8') as f:
changelog = f.read()
idx = changelog.find('\nVersion 2.4.2\n')