Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db0a1b8

Browse files
miss-islingtonwillingchugovkAA-Turner
authored
[3.12] Add lightweight comments to conf.py and update docs readme (GH-126100) (#126135)
Add lightweight comments to conf.py and update docs readme (GH-126100) * Update contributing contact info in readme * Add lightweight comments to improve docs workflow understanding * Apply code review suggestions from @hugovk * Add code review suggestion from @AA-Turner * Update Doc/conf.py * Update Doc/conf.py * Update Doc/conf.py --------- (cherry picked from commit 9effa0f) Co-authored-by: Carol Willing <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Adam Turner <[email protected]>
1 parent 515a5d3 commit db0a1b8

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

Doc/README.rst

Lines changed: 2 additions & 5 deletions
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 [email protected],
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-
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

Lines changed: 14 additions & 9 deletions
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',
@@ -48,7 +51,7 @@
4851
except ImportError:
4952
_tkinter = None
5053
# Treat warnings as errors, done here to prevent warnings in Sphinx code from
51-
# causing spurious test failures.
54+
# causing spurious CPython test failures.
5255
import warnings
5356
warnings.simplefilter('error')
5457
del warnings
@@ -72,10 +75,10 @@
7275
.. |python_version_literal| replace:: ``Python {version}``
7376
"""
7477

75-
# There are two options for replacing |today|: either, you set today to some
76-
# non-false value, then it is used:
78+
# There are two options for replacing |today|. Either, you set today to some
79+
# non-false value and use it.
7780
today = ''
78-
# Else, today_fmt is used as the format for a strftime call.
81+
# Or else, today_fmt is used as the format for a strftime call.
7982
today_fmt = '%B %d, %Y'
8083

8184
# By default, highlight as Python 3.
@@ -87,10 +90,11 @@
8790
# Create table of contents entries for domain objects (e.g. functions, classes,
8891
# attributes, etc.). Default is True.
8992
toc_object_entries = True
93+
# Hide parents to tidy up long entries in sidebar
9094
toc_object_entries_show_parents = 'hide'
9195

9296
# Ignore any .rst files in the includes/ directory;
93-
# they're embedded in pages but not rendered individually.
97+
# they're embedded in pages but not rendered as individual pages.
9498
# Ignore any .rst files in the venv/ directory.
9599
exclude_patterns = ['includes/*.rst', 'venv/*', 'README.rst']
96100
venvdir = os.getenv('VENVDIR')
@@ -307,8 +311,9 @@
307311
# Options for HTML output
308312
# -----------------------
309313

310-
# Use our custom theme.
314+
# Use our custom theme: https://github.com/python/python-docs-theme
311315
html_theme = 'python_docs_theme'
316+
# Location of overrides for theme templates and static files
312317
html_theme_path = ['tools']
313318
html_theme_options = {
314319
'collapsiblesidebar': True,
@@ -354,7 +359,7 @@
354359
html_last_updated_fmt, time.gmtime(html_time)
355360
)
356361

357-
# Path to find HTML templates.
362+
# Path to find HTML templates to override theme
358363
templates_path = ['tools/templates']
359364

360365
# Custom sidebar templates, filenames relative to this file.
@@ -600,8 +605,8 @@
600605
"cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"),
601606
}
602607

603-
# Options for c_annotations
604-
# -------------------------
608+
# Options for c_annotations extension
609+
# -----------------------------------
605610

606611
# Relative filename of the data files
607612
refcount_file = 'data/refcounts.dat'

0 commit comments

Comments
 (0)