added "os.makedirs('docs/source/_autogenerated', exist_ok=True)" to create _autogenerated directory if not existing

This commit is contained in:
Nicolas Kruse 2025-06-06 13:36:55 +02:00
parent ce48083e77
commit a65dbee17d
1 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import importlib
import inspect
import fnmatch
from io import TextIOWrapper
import os
def write_manual(f: TextIOWrapper, doc_files: list[str], title: str) -> None:
@ -74,6 +75,9 @@ def write_dochtree(f: TextIOWrapper, title: str, items: list[str]):
if __name__ == "__main__":
# Ensure the output directory exists
os.makedirs('docs/source/_autogenerated', exist_ok=True)
with open('docs/source/_autogenerated/index.md', 'w') as f:
f.write('# Classes and functions\n\n')