Merge pull request #6643 from jepler/remove-autoapi-workaround
Remove workaround for autoapi bug
This commit is contained in:
commit
562cbb11b9
19
conf.py
19
conf.py
@ -33,25 +33,6 @@ from sphinx import addnodes
|
|||||||
|
|
||||||
tools_describe = str(pathlib.Path(__file__).parent / "tools/describe")
|
tools_describe = str(pathlib.Path(__file__).parent / "tools/describe")
|
||||||
|
|
||||||
# Monkeypatch autoapi
|
|
||||||
def _format_args(args_info, include_annotations=True, ignore_self=None):
|
|
||||||
result = []
|
|
||||||
|
|
||||||
for i, (prefix, name, annotation, default) in enumerate(args_info):
|
|
||||||
if i == 0 and ignore_self is not None and name == ignore_self:
|
|
||||||
continue
|
|
||||||
formatted = "{}{}{}{}".format(
|
|
||||||
prefix or "",
|
|
||||||
name or "",
|
|
||||||
": {}".format(annotation) if annotation and include_annotations else "",
|
|
||||||
(" = {}" if annotation else "={}").format(default) if default else "",
|
|
||||||
)
|
|
||||||
result.append(formatted)
|
|
||||||
return ", ".join(result)
|
|
||||||
|
|
||||||
import autoapi.mappers.python.objects as objects
|
|
||||||
objects._format_args = _format_args
|
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
|
Loading…
Reference in New Issue
Block a user