WIP: Docs: use a Sphinx extension to eliminate excessive links#145130
WIP: Docs: use a Sphinx extension to eliminate excessive links#145130nedbat wants to merge 1 commit intopython:mainfrom
Conversation
|
I had a good idea: instead of writing a linter to change .rst files (pinging everyone, expecting reviews, hardcoding what's excessive, etc), now we have a Sphinx extension that does it all on the fly during the build. |
|
Of course: if we like this, I'll publish linklint for real. |
|
Some methods aren't unlinking properly, like ZipFile.close, but I think that's because the .rst is wrong: the methods aren't indented under the class. Is that a mistake in the .rst? Sphinx understands that "close" is "ZipFile.close", or is that because the .rst has |
|
I see many classes document their methods that way, so there's more work to do. |
|
In general I think this is a good idea, no big source change+pings+reviews. We have been careful not to use third-party extensions that downstream redistributors might not have installed, and this extension would be fine: we can list it in Comparing some pages that were mentioned during the discussion:
We could possibly omit links for the repeated
Unlinks the second pair of
Unlinks repeats 👍 |
📚 Documentation preview 📚: https://cpython-previews--145130.org.readthedocs.build/