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 1414# All configuration values have a default; values that are commented out
1515# serve to show the default.
1616
17- import sys
17+ import logging
1818import os
1919import shlex
20+ import sys
2021
2122# If extensions (or modules to document with autodoc) are in another directory,
2223# add these directories to sys.path here. If the directory is relative to the
@@ -361,4 +362,21 @@ napoleon_use_admonition_for_references = False
361362napoleon_use_ivar = False
362363napoleon_use_param = True
363364napoleon_use_rtype = True
365+
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())
364382{% endblock %}
Original file line number Diff line number Diff line change 1414# All configuration values have a default; values that are commented out
1515# serve to show the default.
1616
17- import sys
17+ import logging
1818import os
1919import shlex
20+ import sys
2021
2122# If extensions (or modules to document with autodoc) are in another directory,
2223# add these directories to sys.path here. If the directory is relative to the
@@ -372,4 +373,21 @@ napoleon_use_admonition_for_references = False
372373napoleon_use_ivar = False
373374napoleon_use_param = True
374375napoleon_use_rtype = True
376+
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())
375393{% endblock %}
You can’t perform that action at this time.
0 commit comments