Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-06-02 08:02:25 +0300
committerCampbell Barton <campbell@blender.org>2022-06-02 08:02:25 +0300
commitd73adfdc863e0c003647a0c59d4d92b4f6583420 (patch)
tree4d0e8d3972c2a6aa3f87aceca15d8989fd1ad700
parent0f73a27b76d789df04158905cba65dec0881bf12 (diff)
PyDoc: changes to the generated conf.py file
- Set the highlight language to python3 (excludes python2 syntax). - Set the encoding for code highlighting to utf-8 (no need to detect). - Update deprecated variable name. - Remove redundant unicode prefixed string.
-rw-r--r--doc/python_api/sphinx_doc_gen.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index bba5430cd95..66bd414f425 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -1814,11 +1814,16 @@ def write_sphinx_conf_py(basepath):
fw("extensions = ['sphinx.ext.intersphinx']\n\n")
fw("intersphinx_mapping = {'blender_manual': ('https://docs.blender.org/manual/en/dev/', None)}\n\n")
fw("project = 'Blender %s Python API'\n" % BLENDER_VERSION_STRING)
- fw("master_doc = 'index'\n")
- fw("copyright = u'Blender Foundation'\n")
+ fw("root_doc = 'index'\n")
+ fw("copyright = 'Blender Foundation'\n")
fw("version = '%s'\n" % BLENDER_VERSION_DOTS)
fw("release = '%s'\n" % BLENDER_VERSION_DOTS)
+ # Set this as the default is a super-set of Python3.
+ fw("highlight_language = 'python3'\n")
+ # No need to detect encoding.
+ fw("highlight_options = {'default': {'encoding': 'utf-8'}}\n\n")
+
# Quiet file not in table-of-contents warnings.
fw("exclude_patterns = [\n")
fw(" 'include__bmesh.rst',\n")