Skip to content

Commit 9effa0f

Browse files
willingchugovkAA-Turner
authored
Add lightweight comments to conf.py and update docs readme (pythonGH-126100)
* Update contributing contact info in readme * Add lightweight comments to improve docs workflow understanding * Apply code review suggestions from @hugovk Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> * Add code review suggestion from @AA-Turner Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> * Update Doc/conf.py Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> * Update Doc/conf.py Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> * Update Doc/conf.py Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --------- Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent aab58a9 commit 9effa0f

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

Doc/README.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,5 @@ Bugs in the content should be reported to the
133133

134134
Bugs in the toolset should be reported to the tools themselves.
135135

136-
You can also send a mail to the Python Documentation Team at docs@python.org,
137-
and we will process your request as soon as possible.
138-
139-
If you want to help the Documentation Team, you are always welcome. Just send
140-
a mail to docs@python.org.
136+
To help with the documentation, or report any problems, please leave a message
137+
on `discuss.python.org <https://discuss.python.org/c/documentation>`_.

Doc/conf.py

+14-9
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@
1313

1414
import sphinx
1515

16+
# Make our custom extensions available to Sphinx
1617
sys.path.append(os.path.abspath('tools/extensions'))
1718
sys.path.append(os.path.abspath('includes'))
1819

20+
# Python specific content from Doc/Tools/extensions/pyspecific.py
1921
from pyspecific import SOURCE_URI
2022

2123
# General configuration
2224
# ---------------------
2325

26+
# Our custom Sphinx extensions are found in Doc/Tools/extensions/
2427
extensions = [
2528
'audit_events',
2629
'availability',
@@ -54,7 +57,7 @@
5457
except ImportError:
5558
_tkinter = None
5659
# Treat warnings as errors, done here to prevent warnings in Sphinx code from
57-
# causing spurious test failures.
60+
# causing spurious CPython test failures.
5861
import warnings
5962
warnings.simplefilter('error')
6063
del warnings
@@ -80,10 +83,10 @@
8083
.. |usr_local_bin_python_x_dot_y_literal| replace:: ``/usr/local/bin/python{version}``
8184
"""
8285

83-
# There are two options for replacing |today|: either, you set today to some
84-
# non-false value, then it is used:
86+
# There are two options for replacing |today|. Either, you set today to some
87+
# non-false value and use it.
8588
today = ''
86-
# Else, today_fmt is used as the format for a strftime call.
89+
# Or else, today_fmt is used as the format for a strftime call.
8790
today_fmt = '%B %d, %Y'
8891

8992
# By default, highlight as Python 3.
@@ -95,10 +98,11 @@
9598
# Create table of contents entries for domain objects (e.g. functions, classes,
9699
# attributes, etc.). Default is True.
97100
toc_object_entries = True
101+
# Hide parents to tidy up long entries in sidebar
98102
toc_object_entries_show_parents = 'hide'
99103

100104
# Ignore any .rst files in the includes/ directory;
101-
# they're embedded in pages but not rendered individually.
105+
# they're embedded in pages but not rendered as individual pages.
102106
# Ignore any .rst files in the venv/ directory.
103107
exclude_patterns = ['includes/*.rst', 'venv/*', 'README.rst']
104108
venvdir = os.getenv('VENVDIR')
@@ -329,8 +333,9 @@
329333
# Options for HTML output
330334
# -----------------------
331335

332-
# Use our custom theme.
336+
# Use our custom theme: https://github.com/python/python-docs-theme
333337
html_theme = 'python_docs_theme'
338+
# Location of overrides for theme templates and static files
334339
html_theme_path = ['tools']
335340
html_theme_options = {
336341
'collapsiblesidebar': True,
@@ -376,7 +381,7 @@
376381
html_last_updated_fmt, time.gmtime(html_time)
377382
)
378383

379-
# Path to find HTML templates.
384+
# Path to find HTML templates to override theme
380385
templates_path = ['tools/templates']
381386

382387
# Custom sidebar templates, filenames relative to this file.
@@ -621,8 +626,8 @@
621626
"cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"),
622627
}
623628

624-
# Options for c_annotations
625-
# -------------------------
629+
# Options for c_annotations extension
630+
# -----------------------------------
626631

627632
# Relative filename of the data files
628633
refcount_file = 'data/refcounts.dat'

0 commit comments

Comments
 (0)