diff --git a/dev/generate-kerneldocs.py b/dev/generate-kerneldocs.py index afd926c31f..aa418b08a2 100644 --- a/dev/generate-kerneldocs.py +++ b/dev/generate-kerneldocs.py @@ -78,29 +78,6 @@ def genkerneldocs(): + "\n\n" ) - if os.path.isfile( - os.path.join( - CURRENT_DIR, - "..", - "docs-sphinx", - "_auto", - "toctree.txt", - ) - ): - with open( - os.path.join( - CURRENT_DIR, - "..", - "docs-sphinx", - "_auto", - "toctree.txt", - ), - "r+", - ) as f: - if "_auto/kernels.rst" not in f.read(): - print("Updating toctree.txt") - f.write(" " * 4 + "_auto/kernels.rst") - if __name__ == "__main__": genkerneldocs() diff --git a/docs-sphinx/conf.py b/docs-sphinx/conf.py index d6fdfda12e..32b4c040a3 100644 --- a/docs-sphinx/conf.py +++ b/docs-sphinx/conf.py @@ -152,7 +152,7 @@ ) # Generate Python docstrings -runpy.run_path(HERE / "prepare_docstrings.py") +runpy.run_path(HERE / "prepare_docstrings.py", run_name="__main__") # Generate kernel docs -runpy.run_path(HERE.parent / "dev" / "generate-kerneldocs.py") +runpy.run_path(HERE.parent / "dev" / "generate-kerneldocs.py", run_name="__main__")