Mentions légales du service

Skip to content
Snippets Groups Projects
Verified Commit 2d355073 authored by ANDREY Paul's avatar ANDREY Paul
Browse files

Fix API docs generation.

When a '__all__' value is provided in a public module, make use of
it instead of collecting each and every member.

This fixes the collection breaking upon encountering external
packages such as 'warnings' in an '__init__.py' file.
parent 149e2b86
No related branches found
No related tags found
1 merge request!69Enable Fairness-Aware Federated Learning
......@@ -165,7 +165,11 @@ def _generate_private_submodules_content_doc(
) -> Dict[str, str]:
"""Create files for public contents from a module's private submodules."""
pub_obj = {}
for key, obj in module.members.items():
if module.exports is None:
members = module.members
else:
members = {str(k): module.members[str(k)] for k in module.exports}
for key, obj in members.items():
if obj.is_module or obj.module.name in pub_mod or key.startswith("_"):
continue
if not (obj.docstring or obj.is_class or obj.is_function):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment