Skip to content

Commit

Permalink
debug 3
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcapet committed Apr 5, 2024
1 parent 716eb28 commit c576065
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions docs/conf.py
Expand Up @@ -279,8 +279,6 @@ def env_get_outdated(app, env, added, changed, removed):
Remove the items listed in `docs_to_remove` from known pages.
"""
to_remove = set()
print('reading env.found_docs')
print(env.found_docs)
for doc in env.found_docs:
if _to_be_removed(doc):
to_remove.add(doc)
Expand All @@ -293,6 +291,11 @@ def env_get_outdated(app, env, added, changed, removed):
print(changed)
print('reading removed')
print(removed)
print('reading env.found_docs')
print(env.found_docs)
env.project.docnames.difference_update(to_remove)
print('reading env.found_docs')
print(env.found_docs)
return []


Expand All @@ -302,20 +305,10 @@ def doctree_read(app, doctree):
Remove the items listed in `docs_to_remove` from the table of contents.
"""
from sphinx import addnodes
print('doctree_read')
print(list(doctree.traverse(addnodes.toctree)))
print(doctree)
for toc_tree_node in doctree.traverse(addnodes.toctree):
for e in toc_tree_node['entries']:
print('reading toctree entry:')
print(e)
print(_docs_to_remove)
if _to_be_removed(str(e[1])):
print("removing")
print(e)
toc_tree_node['entries'].remove(e)
print('reading toc_tree_node')
print(toc_tree_node['entries'])


def autodoc_skip(app, what, name, obj, would_skip, options):
Expand Down

0 comments on commit c576065

Please sign in to comment.