Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
Expand Down Expand Up @@ -293,29 +292,6 @@
# texinfo_show_urls = 'footnote'


patparam = re.compile(r"(\W*):\W*param.*")


def process_docstring_insert_self(app, what, name, obj, options, lines):
"""
Insert self in front of documented params for instance methods
"""

if (
what == "method"
and app.config.autodoc_typehints in ("both", "description")
and app.config.autodoc_typehints_description_target in ("all")
and getattr(obj, "__self__", None) is None
and "self" in obj.__annotations__
):
for i, line in enumerate(lines):
if m := patparam.match(line):
indent = m.group(1)
lines.insert(i, f"{indent}:param self:")
break


def setup(app):

app.add_css_file("tables.css")
app.connect("autodoc-process-docstring", process_docstring_insert_self)
293 changes: 0 additions & 293 deletions doc/ext/sphinx_autodoc_multimethod.py

This file was deleted.

Loading