added "os.makedirs('docs/source/_autogenerated', exist_ok=True)" to create _autogenerated directory if not existing
This commit is contained in:
parent
ce48083e77
commit
a65dbee17d
|
@ -4,6 +4,7 @@ import importlib
|
||||||
import inspect
|
import inspect
|
||||||
import fnmatch
|
import fnmatch
|
||||||
from io import TextIOWrapper
|
from io import TextIOWrapper
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
def write_manual(f: TextIOWrapper, doc_files: list[str], title: str) -> None:
|
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__":
|
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:
|
with open('docs/source/_autogenerated/index.md', 'w') as f:
|
||||||
f.write('# Classes and functions\n\n')
|
f.write('# Classes and functions\n\n')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue