mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-17 02:03:44 +00:00
docs: fix api ref package tables (#25400)
This commit is contained in:
parent
414154fa59
commit
d178fb9dc3
@ -319,8 +319,6 @@ def _construct_doc(
|
||||
index_autosummary += f"""
|
||||
:ref:`{module}`
|
||||
{'^' * (len(module) + 5)}
|
||||
|
||||
.. autosummary::
|
||||
"""
|
||||
|
||||
if classes:
|
||||
@ -331,6 +329,11 @@ def _construct_doc(
|
||||
|
||||
.. autosummary::
|
||||
:toctree: {module}
|
||||
"""
|
||||
index_autosummary += """
|
||||
**Classes**
|
||||
|
||||
.. autosummary::
|
||||
"""
|
||||
|
||||
for class_ in sorted(classes, key=lambda c: c["qualified_name"]):
|
||||
@ -371,6 +374,14 @@ def _construct_doc(
|
||||
|
||||
{fstring}
|
||||
|
||||
"""
|
||||
|
||||
index_autosummary += f"""
|
||||
**Functions**
|
||||
|
||||
.. autosummary::
|
||||
|
||||
{fstring}
|
||||
"""
|
||||
if deprecated_classes:
|
||||
module_doc += f"""\
|
||||
@ -382,6 +393,12 @@ def _construct_doc(
|
||||
:toctree: {module}
|
||||
"""
|
||||
|
||||
index_autosummary += """
|
||||
**Deprecated classes*
|
||||
|
||||
.. autosummary::
|
||||
"""
|
||||
|
||||
for class_ in sorted(deprecated_classes, key=lambda c: c["qualified_name"]):
|
||||
if class_["kind"] == "TypedDict":
|
||||
template = "typeddict.rst"
|
||||
@ -401,6 +418,9 @@ def _construct_doc(
|
||||
|
||||
{class_["qualified_name"]}
|
||||
|
||||
"""
|
||||
index_autosummary += f"""
|
||||
{class_['qualified_name']}
|
||||
"""
|
||||
|
||||
if deprecated_functions:
|
||||
@ -417,6 +437,14 @@ def _construct_doc(
|
||||
|
||||
{fstring}
|
||||
|
||||
"""
|
||||
index_autosummary += """
|
||||
**Deprecated functions**
|
||||
|
||||
.. autosummary::
|
||||
|
||||
{fstring}
|
||||
|
||||
"""
|
||||
docs.append((f"{module}.rst", module_doc))
|
||||
docs.append(("index.rst", index_doc + index_autosummary))
|
||||
|
Loading…
Reference in New Issue
Block a user