Skip to content

Commit

Permalink
docs: fix use of runpy
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Oct 20, 2022
1 parent 569f183 commit f42b113
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
23 changes: 0 additions & 23 deletions dev/generate-kerneldocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
4 changes: 2 additions & 2 deletions docs-sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__")

0 comments on commit f42b113

Please sign in to comment.