Skip to content

Commit

Permalink
chore: Optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan committed Mar 21, 2024
1 parent 05416f6 commit 23c339d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,6 @@ pii_report

# Pyenv Python version file
.python-version

# Auto generated rst files toc tree
/docs/custom_toctree.rst
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,11 @@ def find_rst_files(directory):


def generate_toctree(custom_toctree_dir):
rst_files = find_rst_files(".")
rst_files = find_rst_files(root)
toctree = "\n".join([" " + file for file in rst_files])
with open(custom_toctree_dir, 'w') as custom_docs:
custom_docs.write("\n..\n\tAutomatically Generated Toctree. See `generate_toctree` \
method in docs/conf.py.\nDo not change the contents of this file manually\n\n")
method in docs/conf.py.\n\tDo not change the contents of this file manually\n\n")
custom_docs.write(".. toctree::\n")
custom_docs.write(" :glob:\n")
custom_docs.write(toctree)
Expand Down

0 comments on commit 23c339d

Please sign in to comment.