This repository was archived by the owner on Mar 26, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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_setup %}
45
56#
67# {{ api.naming.warehouse_package_name }} documentation build configuration file
@@ -361,4 +362,6 @@ napoleon_use_admonition_for_references = False
361362napoleon_use_ivar = False
362363napoleon_use_param = True
363364napoleon_use_rtype = True
365+
366+ {{ sphinx_setup() }}
364367{% endblock %}
Original file line number Diff line number Diff line change 1+ {% macro sphinx_setup () -%}
2+ import logging
3+ from typing import Any
4+
5+ class UnexpectedUnindentFilter(logging.Filter):
6+ """Filter out warnings about unexpected unindentation following bullet lists."""
7+
8+ def filter(self, record: logging.LogRecord) -> bool:
9+ """Filter the log record.
10+
11+ Args:
12+ record (logging.LogRecord): The log record.
13+
14+ Returns:
15+ bool: False to suppress the warning, True to allow it.
16+ """
17+ msg = record.getMessage()
18+ if "Bullet list ends without a blank line" in msg:
19+ return False
20+ return True
21+
22+
23+ def setup(app: Any) -> None:
24+ """Setup the Sphinx application.
25+
26+ Args:
27+ app (Any): The Sphinx application.
28+ """
29+ # Sphinx's logger is hierarchical. Adding a filter to the
30+ # root 'sphinx' logger will catch warnings from all sub-loggers.
31+ logger = logging.getLogger('sphinx')
32+ logger.addFilter(UnexpectedUnindentFilter())
33+ {% - endmacro %}
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_setup %}
45
56#
67# {{ api.naming.warehouse_package_name }} documentation build configuration file
@@ -372,4 +373,6 @@ napoleon_use_admonition_for_references = False
372373napoleon_use_ivar = False
373374napoleon_use_param = True
374375napoleon_use_rtype = True
376+
377+ {{ sphinx_setup() }}
375378{% endblock %}
You can’t perform that action at this time.
0 commit comments