diff --git a/autoautosummary.py b/autoautosummary.py index 7dbb5e53b64a..4d7e1d8ba096 100644 --- a/autoautosummary.py +++ b/autoautosummary.py @@ -10,14 +10,11 @@ from docutils import nodes from docutils.parsers.rst import directives from sphinx.ext import autosummary -from sphinx.ext.autodoc import MethodDocumenter from sphinx.ext.autosummary import Autosummary, ImportExceptionGroup from sphinx.locale import __ from sphinx.util import logging from sphinx.util.inspect import isstaticmethod, safe_getattr -from documenters import OverloadedPythonMethodDocumenter - # from sphinx.directives import directive logger = logging.getLogger(__name__) @@ -37,21 +34,6 @@ def new_extract_summary(doc: list[str], document: Any) -> str: autosummary.extract_summary = new_extract_summary -old_get_documenter = autosummary.get_documenter - - -def new_get_documenter(app, obj: Any, parent: Any): - res = old_get_documenter(app, obj, parent) - if issubclass(res, OverloadedPythonMethodDocumenter): - # sorry, gross hack! OverloadedPythonMethodDocumenter works well - # for generating the actual docs, but fails when we are building - # the table of contents. So fallback to original class instead... - return MethodDocumenter - return res - - -autosummary.get_documenter = new_get_documenter - class AutoAutoSummary(Autosummary): """