Skip to content

Commit 7542c22

Browse files
committed
handle edge cases
1 parent 9db4f8e commit 7542c22

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/documentation_generator.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ def build_overview_structure(self, module_tree: Dict[str, Any], module_path: Lis
115115
module_info = module_info["children"]
116116

117117
for child_name, child_info in module_info.items():
118-
child_info["docs"] = file_manager.load_text(os.path.join(working_dir, f"{child_name}.md"))
118+
if os.path.exists(os.path.join(working_dir, f"{child_name}.md")):
119+
child_info["docs"] = file_manager.load_text(os.path.join(working_dir, f"{child_name}.md"))
120+
else:
121+
logger.warning(f"Module docs not found at {os.path.join(working_dir, f"{child_name}.md")}")
122+
child_info["docs"] = ""
119123

120124
return processed_module_tree
121125

0 commit comments

Comments
 (0)