Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: API Reference builder bug fix #17890

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 3 additions & 6 deletions docs/api_reference/create_api_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ def _construct_doc(

for module in namespaces:
_members = members_by_namespace[module]
classes = _members["classes_"]
functions = _members["functions"]
classes = [el for el in _members["classes_"] if el["is_public"]]
functions = [el for el in _members["functions"] if el["is_public"]]
if not (classes or functions):
continue
section = f":mod:`{package_namespace}.{module}`"
Expand All @@ -244,9 +244,6 @@ def _construct_doc(
"""

for class_ in sorted(classes, key=lambda c: c["qualified_name"]):
if not class_["is_public"]:
continue

if class_["kind"] == "TypedDict":
template = "typeddict.rst"
elif class_["kind"] == "enum":
Expand All @@ -264,7 +261,7 @@ def _construct_doc(
"""

if functions:
_functions = [f["qualified_name"] for f in functions if f["is_public"]]
_functions = [f["qualified_name"] for f in functions]
fstring = "\n ".join(sorted(_functions))
full_doc += f"""\
Functions
Expand Down