sphinx
sphinx copied to clipboard
Make toctree accept 'genindex', 'modindex' and 'search' docnames
Subject: Make toctree accept 'genindex', 'modindex' and 'search' docnames
Feature or Bugfix
Bugfix
Relates
Fixes #8438
The PR works when building a project, but there's obviously still something missing. I'll need to look into the failing tests...
I have some questions on how to continue with this:
- Should this target master or 0.5?
- mypy:
sphinx/environment/adapters/toctree.py:142:51: error: "Domain" has no attribute "labels"; maybe "label"? [attr-defined]Domain definitely has a labels attribute, but perhaps not at object initialization time. Can this be somehow flagged for mypy to ignore this?
Is there anything I can do at this point? Thanks!
mypy:
sphinx/environment/adapters/toctree.py:142:51: error: "Domain" has no attribute "labels"; maybe "label"? [attr-defined]Domain definitely has a labels attribute, but perhaps not at object initialization time. Can this be somehow flagged for mypy to ignore this?
Add # type: ignore[attr-defined] as a quick fix.
A
Looks good, I updated the implementation so as not to hard-code the "special" in more places. The only open question is the glob behaviour (see linked issue).
A
Thanks @brechtm!
A
Many thanks, @AA-Turner, for bringing this to completion!