This repository was archived by the owner on Mar 26, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-33
lines changed
Expand file tree Collapse file tree 3 files changed +7
-33
lines changed Original file line number Diff line number Diff line change 11{% extends '_base.py.j2' %}
22
33{% block content %}
4+ {% from "docs/common_setup.py.j2" import sphinx_imports , sphinx_setup %}
45
56#
67# {{ api.naming.warehouse_package_name }} documentation build configuration file
@@ -18,6 +19,7 @@ import logging
1819import os
1920import shlex
2021import sys
22+ {{ sphinx_imports() }}
2123
2224# If extensions (or modules to document with autodoc) are in another directory,
2325# add these directories to sys.path here. If the directory is relative to the
@@ -363,20 +365,6 @@ napoleon_use_ivar = False
363365napoleon_use_param = True
364366napoleon_use_rtype = True
365367
366- # --- Specific warning filters not covered by suppress_warnings ---
367-
368- class UnexpectedUnindentFilter(logging.Filter):
369- """Filter out warnings about unexpected unindentation following bullet lists."""
370- def filter(self, record):
371- # Return False to suppress the warning, True to allow it
372- msg = record.getMessage()
373- if "Bullet list ends without a blank line" in msg:
374- return False
375- return True
376-
377- def setup(app):
378- # Sphinx's logger is hierarchical. Adding a filter to the
379- # root 'sphinx' logger will catch warnings from all sub-loggers.
380- logger = logging.getLogger('sphinx')
381- logger.addFilter(UnexpectedUnindentFilter())
368+ # Setup for sphinx behaviors such as warning filters.
369+ {{ sphinx_setup() }}
382370{% endblock %}
Original file line number Diff line number Diff line change 11{% extends '_base.py.j2' %}
22
33{% block content %}
4-
4+ {% from "docs/common_setup.py.j2" import sphinx_imports , sphinx_setup %}
55#
66# {{ api.naming.warehouse_package_name }} documentation build configuration file
77#
@@ -18,6 +18,7 @@ import logging
1818import os
1919import shlex
2020import sys
21+ {{ sphinx_imports() }}
2122
2223# If extensions (or modules to document with autodoc) are in another directory,
2324# add these directories to sys.path here. If the directory is relative to the
@@ -374,20 +375,5 @@ napoleon_use_ivar = False
374375napoleon_use_param = True
375376napoleon_use_rtype = True
376377
377- # --- Specific warning filters not covered by suppress_warnings ---
378-
379- class UnexpectedUnindentFilter(logging.Filter):
380- """Filter out warnings about unexpected unindentation following bullet lists."""
381- def filter(self, record):
382- # Return False to suppress the warning, True to allow it
383- msg = record.getMessage()
384- if "Bullet list ends without a blank line" in msg:
385- return False
386- return True
387-
388- def setup(app):
389- # Sphinx's logger is hierarchical. Adding a filter to the
390- # root 'sphinx' logger will catch warnings from all sub-loggers.
391- logger = logging.getLogger('sphinx')
392- logger.addFilter(UnexpectedUnindentFilter())
378+ {{ sphinx_setup() }}
393379{% endblock %}
You can’t perform that action at this time.
0 commit comments